Commit Graph

89 Commits

Author SHA1 Message Date
Jérôme Dockès e1ce967a33
ENH detect categorical polars columns in HistGradientBoosting (#27835)
Co-authored-by: Olivier Grisel <olivier.grisel@ensta.org>
2023-12-05 10:15:06 +01:00
Christian Lorentzen 7b9f794fd3
ENH reuse parent histograms as one of the child's histogram (#27865) 2023-12-03 12:53:17 -05:00
Thomas J. Fan 08b6157b0e
PERF Improve runtime for early stopping in HistGradientBoosting (#26163)
Co-authored-by: Olivier Grisel <olivier.grisel@ensta.org>
2023-11-27 08:45:15 +01:00
Thomas J. Fan 4cf13d2b5f
ENH Adds native pandas categorical support to gradient boosting (#26411)
Co-authored-by: Olivier Grisel <olivier.grisel@ensta.org>
Co-authored-by: Guillaume Lemaitre <g.lemaitre58@gmail.com>
2023-11-17 20:07:08 +01:00
Christian Lorentzen fc11deaf7f
ENH add feature subsampling per split for HGBT (#27139)
Co-authored-by: Olivier Grisel <olivier.grisel@ensta.org>
2023-11-14 18:26:01 +00:00
Adrin Jalali 42173fdb34
MNT add isort to ruff's rules (#26649) 2023-06-21 17:50:07 +02:00
Christian Lorentzen c0bac2b5ac
TST catch UserWarning in test_predictions for HGBT (#26312) 2023-05-23 15:20:13 +02:00
Adrin Jalali 893d5accaf
MNT Update black to 23.3.0 (#26110) 2023-04-06 12:14:16 -04:00
Thomas J. Fan de968edd70
FIX Adds support for negative values in categorical features in gradient boosting (#25629)
Co-authored-by: Julien Jerphanion <git@jjerphan.xyz>
Co-authored-by: Tim Head <betatim@gmail.com>
2023-04-05 09:36:46 +02:00
Jérémie du Boisberranger 7057727fe5
MAINT Clean deprecated losses in (hist) gradient boosting for 1.3 (#25834) 2023-03-13 12:57:33 -04:00
Ralf Gommers d926ff130f
MAINT remove np.product and inf/nan aliases in favor of canonical names (#25741) 2023-03-02 10:52:07 +01:00
Christian Lorentzen 7b13a8f120
FEA Add Gamma deviance as loss function to HGBT (#22409)
* FEA add gamma loss to HGBT

* DOC add whatsnew

* CLN address review comments

* TST make test_gamma pass by not testing out-of-sample

* TST compare gamma and poisson to LightGBM

* TST fix test_gamma by comparing to MSE HGBT instead of Poisson HGBT

* TST fix for test_same_predictions_regression for poisson

* CLN address review comments

* CLN nits

* CLN better comments

* TST use pytest.param with skip mark

* TST Correct conditional test parametrization mark

Co-authored-by: Christian Lorentzen <lorentzen.ch@gmail.com>

* CI Trigger CI

Builds currently fail because requests to Azure Ubuntu repository
timeout.

* DOC add comment for lax comparison with LightGBM

* CLN tuple needs trailing comma

---------

Co-authored-by: Julien Jerphanion <git@jjerphan.xyz>
2023-01-30 15:50:22 +00:00
Olivier Grisel bd3ab49781
ENH improve error messages for invalid categorical variables in HGBDT (#25173) 2022-12-14 11:45:51 -05:00
Jérémie du Boisberranger 14130f44eb
MAINT Allow partial param validation for functions (#25087) 2022-12-06 15:59:08 +01:00
Olivier Grisel c557080d39
ENH better error message in HGBRT with feature names (#25092)
Co-authored-by: jeremie du boisberranger <jeremiedbb@yahoo.fr>
2022-12-02 12:53:23 +01:00
Tim Head df14322656
ENH Add interaction constraint shortcuts to HistGradientBoosting* (#24849)
Co-authored-by: jeremie du boisberranger <jeremiedbb@yahoo.fr>
2022-11-25 16:50:37 +01:00
Tim Head 73642d4a52
API Limit interaction_cst to list/tuple of lists/tuples/sets in HistGradientBoosting* (#24915) 2022-11-22 15:22:53 +01:00
Olivier Grisel 74ddf01986
ENH Add support for feature names in monotonic_cst (#24855)
Co-authored-by: Julien Jerphanion <git@jjerphan.xyz>
Co-authored-by: Thomas J. Fan <thomasjpfan@gmail.com>
Co-authored-by: Tim Head <betatim@gmail.com>
2022-11-15 16:32:40 +01:00
Olivier Grisel 84a7a7a802
ENH Specify categorical features with feature names in HGBDT (#24889)
* Allow categorical_features to be passed as feature names

* Update relevant examples

* Call .set_output(transform='pandas') on the pipelines
2022-11-13 13:40:47 +01:00
Christian Lorentzen 5ceb8a6a03
ENH FEA add interaction constraints to HGBT (#21020)
Co-authored-by: Loïc Estève <loic.esteve@ymail.com>
2022-10-11 17:48:45 -04:00
Thomas J. Fan 072b481600
FIX Treat gradient boosting categoricals outside the bounds as unknown during predict (#24283) 2022-09-30 14:58:49 +02:00
Rushil Desai 7134e4183c
API Rename OneHotEncoder option sparse to sparse_output (#24412)
Co-authored-by: Christian Lorentzen <lorentzen.ch@gmail.com>
Co-authored-by: Jérémie du Boisberranger <34657725+jeremiedbb@users.noreply.github.com>
2022-09-16 13:46:53 +02:00
Thomas J. Fan 7fda68d457
FEA Adds class_weight to HistGradientBoostingClassifier (#22014)
Co-authored-by: Olivier Grisel <olivier.grisel@ensta.org>
Co-authored-by: jeremie du boisberranger <jeremiedbb@yahoo.fr>
2022-09-16 12:07:30 +02:00
Jérémie du Boisberranger 2ee49dc050
MAINT Clean deprecation for 1.2: losses in gradient boosting (#24394) 2022-09-13 11:38:24 +02:00
Hao Chun Chang 5c85567172
MAINT Use _validate_params in HistGradientBoosting* (#23479)
Co-authored-by: Jérémie du Boisberranger <34657725+jeremiedbb@users.noreply.github.com>
Co-authored-by: jeremiedbb <jeremiedbb@yahoo.fr>
2022-06-23 18:29:29 +02:00
Christian Lorentzen 5b69652dd0
DEP loss = auto, binary_crossentropy, categorical_crossentropy in HGBT (#23040)
Co-authored-by: Jérémie du Boisberranger <34657725+jeremiedbb@users.noreply.github.com>
2022-04-07 17:30:24 +02:00
Thomas J. Fan d4aad64b1e
MNT Update to black 22.3.0 to resolve click error (#22983)
* MNT Update to black 22.3.0 to resolve click error

* STY Update for new black version
2022-03-29 12:04:41 +02:00
Thomas J. Fan 4408dfb86b
FIX Removes warning in HGBT when fitting on dataframes (#22908) 2022-03-25 10:56:49 +01:00
Christian Lorentzen 5ad3421a5b
FEA add quantile HGBT (#21800) 2022-02-22 17:03:14 +01:00
Thomas J. Fan 1fc86b6aac
MNT Update black to stable version (#22474) 2022-02-15 11:36:26 +01:00
Sultan Orazbayev cd892f9688
DOC use the arxiv directive in the docstrings (#21418)
Co-authored-by: aufarkari <aufar.di.sini@gmail.com>
Co-authored-by: Chiara Marmo <cmarmo@users.noreply.github.com>
Co-authored-by: Julien Jerphanion <git@jjerphan.xyz>
Co-authored-by: Guillaume Lemaitre <g.lemaitre58@gmail.com>
2022-01-28 17:55:55 +01:00
Christian Lorentzen 4e974e0d5e
ENH Replace loss module HGBT (#20811) 2022-01-11 15:02:41 -05:00
Thomas J. Fan a2eb04da26
TST Adjust learning rate to compare with LightGBM 3.X (#21082)
Co-authored-by: Christian Lorentzen <lorentzen.ch@gmail.com>
2021-09-24 11:09:33 +02:00
Dimitri Papadopoulos Orfanos f71c031314
DOC Typos found by codespell (#21069) 2021-09-17 19:04:54 +02:00
Thomas J. Fan 99410b1bde
ENH Uses _openmp_effective_n_threads to set the number of threads in HistGradientBoosting* (#20477) 2021-07-09 10:13:39 +02:00
Thomas J. Fan 3ae7c76153
STY Enables black with experimental_string_processing=true (#20412) 2021-06-29 09:47:04 +02:00
Thomas J. Fan 82df48934e
MNT Applies black formatting to most of the code base (#18948) 2021-06-17 14:21:09 -04:00
Chiara Marmo 40b45e6b7c
[MRG] CI Push Scipy minimum version to 1.1.0. Remove Python 3.6 from builds. (#20069)
* Push scipy min version to 1.0.0

* Update all ubuntu images to 20.04 focal.

* Add ubuntu images 18.04 bionic and scipy fron conda-forge.

* Fix conditions.

* Pin python 3.6 for ubuntu bionic.

* Change pipeline name.

* Change matrix element name.

* Keep python 3.9 from system not conda in Ubuntu 20.04.

* Remove python directive when unnecessary.

* Cleanup.

* Downgrade to python 3.6 as scipy 1.0.0 is incompatible with 3.8.

* Fix comment.

* Fix comment.

* Pin pytest again as we are forced to use 3.6.

* Move to conda installer for 32bit linux.

* Install miniconda for ubuntu 32bit.

* Install wget for ubuntu 32bit.

* Revert 32bit OS to ubuntu bionic 18.04.

* Install scipy from pip in 32bit system.

* Fix doctest failures.

* Revert example rendering.

* Relax pytest version in ubuntu install.

* Skip failing tests.

* Put comment at the right place.

* Remove python3.6. Ubuntu32 still needs to be adapted.

* Push numpy and scipy min versions for compatibility with 3.7.

* Push matplotlib min version for compatibility with 3.7. Install numpy via pip in 32bit linux.

* Install numpy before scipy in Linux 32bit.

* Pass numpy version to linux32.

* Test 32bit architecture on debian buster (still exists for 32bit with python 3.7).

* Install matplotlib from distribution.

* Syntax error...

* Stick to the numpy debian version to avoid Expected 124 from C header, got 112 from PyObject error.

* Clean comments.

* Revert skip in doctest to check with new dependencies.

* Rename distrib.

* Skip again...

* Fix test on check_array.

* Remove comment and fix lint at the same time.

* Clean import.

* Increase atol in test_derivatives to make the test pass in py37_conda_openblas environment.

* Avoid sparse matrix dependent on scipy version.

* Skip docstring test for pandas versions less then 1.1.0.

* Fix lint error.

* Empty commit to force checks.

* Add minimal dependencies in changelog.

* Update to python 3.7 CircleCI and Travis builds.

* Move to debian buster for python3.7 dependencies.

* Fix the container tag.

* Lower the minimal pandas version for compatibility with python 3.7.
2021-05-18 16:09:36 +02:00
Christian Lorentzen 2bd3a4db52
ENH Consistent loss name for absolute error (#19733) 2021-05-10 22:10:21 +02:00
Nicolas Hug 309f135c32
MNT Remove HistGradientBoosting from experimental (#19799) 2021-04-02 16:40:20 +02:00
Christian Lorentzen b9d6db81ec
[MRG] ENH Consistent loss name for squared error (#19310) 2021-03-19 15:21:34 +01:00
vadim-ushtanit 087a684191
FIX index sample_weight in least_absolute_deviation loss in HistGradientBoosting (#19407)
Co-authored-by: Vadim Ushtanit <vadim.ushtanit@gmail.com>
Co-authored-by: Nicolas Hug <contact@nicolas-hug.com>
Co-authored-by: Guillaume Lemaitre <g.lemaitre58@gmail.com>
2021-02-10 09:49:30 +01:00
Thomas J. Fan b94332434d
API Removes tol=None option from HistGradientBoosting* (#19296)
* API Removes tol=None option from HistGradient*

* Pass tol=0.0 instead of tol=None in early stopping tests

Co-authored-by: Olivier Grisel <olivier.grisel@ensta.org>
2021-01-29 15:07:25 +01:00
Chiara Marmo cdde01174e
TST Fix DeprecationWarning for np.bool type. (#18927)
Co-authored-by: Juan Carlos Alfaro Jiménez <JuanCarlos.Alfaro@uclm.es>
2020-11-27 11:03:44 -05:00
Thomas J. Fan b4453f126f
ENH Add Categorical support for HistGradientBoosting (#18394)
Co-authored-by: Nicolas Hug <contact@nicolas-hug.com>
Co-authored-by: Olivier Grisel <olivier.grisel@ensta.org>
Co-authored-by: Olivier Grisel <olivier.grisel@gmail.com>
2020-11-16 23:10:12 +01:00
Thomas J. Fan cd673475bd
CLN Refactors find binning threshold (#18395) 2020-10-14 18:42:56 +02:00
Nicolas Hug df61e9ed98
FIX accept uint8 X in hist-gbdt.predict (#18410)
* fixed dtype issue

* whatsnew

* dont pass lists
2020-09-26 09:55:35 +02:00
Olivier Grisel e325f16d6a
ENH Break cyclic references in Histogram GBRT (#18334)
Co-authored-by: Nicolas Hug <contact@nicolas-hug.com>
2020-09-03 15:47:25 -04:00
Nicolas Hug 754cac3ee9
MNT change bin_thresholds param name (#18179) 2020-08-21 16:07:55 +02:00
Juan Carlos Alfaro Jiménez 9cd13a1fa1
FIX Change MRO for some estimators (#17837) 2020-07-05 13:52:42 +02:00