Commit Graph

63 Commits

Author SHA1 Message Date
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
Christos Aridas 2b503bdc08
CLN Remove self-assignments from tests (#17776) 2020-06-29 15:22:21 -04:00
Chiara Marmo 5ea5da4ae4
DOC add missing attributes in HistGradientBoostingClassifier (#17678)
Co-authored-by: Nicolas Hug <contact@nicolas-hug.com>
2020-06-24 19:15:37 +02:00
Thomas J. Fan 7cc0177f8e
MNT Replaces numpy alias with builtin typse (#17687)
* MNT Replaces numpy alias with builtin typse

* STY Lint error
2020-06-24 16:51:51 +02:00
Hirofumi Suzuki c29092d699
MNT define a parse_version function in sklearn.utils.fixes (#17670)
Co-authored-by: Loïc Estève <loic.esteve@ymail.com>
Co-authored-by: Roman Yurchak <rth.yurchak@gmail.com>
2020-06-24 13:35:49 +02:00
Hao Chun Chang f58c2bc2df
FEA Add staged_predict to HistGradientBoosting (#16985) 2020-05-17 10:02:34 -04:00
Christian Lorentzen a6a20f29d7
MNT fix test for binary crossentropy in hist-GBDT (#16691) 2020-05-11 14:25:16 -04:00
Thomas J Fan ad6a9f977e
TST Skips derivative check on 32bit platforms (#17073)
* TST Checks type for derivative check

* TST Skips test for 32bit linux

* REV Less diffs
2020-04-29 10:05:37 +02:00
Lucy Liu 7844d1c2d7
TST Replace boston in histgradboost test_predictor (#16918) 2020-04-23 13:19:52 -04:00
Christian Lorentzen a93b15f19b
ENH Poisson loss for HistGradientBoostingRegressor (#16692) 2020-04-23 10:27:35 -04:00
Geoffrey Bolmier 9d366a4f74
ENH Add custom loss support for HistGradientBoosting (#16908) 2020-04-15 13:38:22 -04:00
Thomas J Fan 270c673483
TST Fixes comment in test to reflect actual missing value (#16872) 2020-04-07 14:42:28 -04:00
Nicolas Hug 36ebf3e371
[MRG] Monotonic constraints for GBDT (#15582) 2020-03-24 20:27:00 +01:00
Thomas J Fan cdbda0eddb
BUG Fixes HistGradientBoosting when warm_start is on + early_stopping is on + no validation (#16663) 2020-03-11 09:39:25 +01:00
Adrin Jalali e24998f19c
ENH Support sample weights in HGBT (#14696) 2020-02-24 13:45:50 -05:00
Roman Feldbauer 9b39c4c4d2
TST Fix unreachable code in tests (#16110) 2020-02-16 14:41:26 +01:00
Johann Faouzi ee6b369b82
FEA Turn on early stopping in histogram GBDT by default (#14516) 2020-02-12 10:45:21 -05:00
Nicolas Hug 98b3c7c871
FIX max_leaf_node and max_depth interaction in GBDT (#16183)
* fix max_leaf_node max_depth interaction

* Added test

* comment

* what's new

* simpler solution

* moved and simplified test

* typo
2020-02-07 15:07:37 +01:00
SanthoshBala18 cc2fbeddfa BUG max_depth=1 should be decision stump in HistGradientBoosti… (#16182) 2020-01-28 13:07:42 -05:00
Brian Wignall c4733f4895 MNT Fix some easy-to-make typos (#15720) 2019-11-26 06:31:40 -06:00
Nicolas Hug 97958c174f FIX fix bug when warm starting with early stopping in Hist GBDT (#15624) 2019-11-15 11:02:38 +01:00
Nicolas Hug b92455a6b2 MAINT Deprecate all of utils.testing except all_estimators (#15367) 2019-10-28 17:28:56 +01:00
Adrin Jalali 38af35db9c FIX raise error when using categorical_crossentropy in binary problem in HGBDT (#14869) 2019-09-20 10:23:34 +02:00
Johann Faouzi 78c06e504c [MRG] MNT Use one single random seed for warm start and subsampling in HGBDT (#14999) 2019-09-19 09:33:36 -04:00
Nicolas Hug 5cf88db244 EHN Implement least absolute deviation loss in GBDTs (#13896) 2019-09-09 10:26:52 +02:00
Guillaume Lemaitre 947dffcc9c FIX encode target for scoring when using early stopping in HistGradientBoostinClassifier (#14710)
* FIX encode target for scoring when using early stopping in HistGradientBoostingClassifier

* add line

* reviews
2019-08-22 15:22:38 +02:00
Nicolas Hug 4b6273b874 ENH Native support for missing values in GBDTs (#13911)
* Added NaN support in mapper

* pep

* WIP

* some more

* WIP

* WIP

* bug fix

* basic tests

* some doc

* avoid some interactions

* Added tag

* better test

* decent test + fix bug

* add missing_fraction param to benchmark

* bin training and validation data separately

* shorter test

* Map missing values to first bin instead of last

* pep8

* Added whats new entry

* avoid some python interactions

* make predict_binned work

* fixed bug due to offset in bin_thresholds_ attribute

* more sensible binning strat

* typo

* user name

* Add small test

* convert to fortran array in tests

* some doc

* Added function test

* pep8

* Bin validation data using binmaper of training data

* Allocate first bin for missing entries based on the whole data, not just
training data.

* Addressed Thomas' comments

* Update sklearn/ensemble/_hist_gradient_boosting/tests/test_grower.py

* Addressed Guillaume's comments

* always allocate first bin for missing values

* reduce diff

* minor more consistent test

* typo

* WIP

* some doc

* reduce diff

* pep8

* minor

* remove prints

* towards nan only splits

* don't check right to left on split_on_nan

* cleaups

* format and comment

* Fixed bug + added more tests

* refactor tests

* put back n_threads to max value

* minor changes

* minor cleaning

* Add (failing) test that checks equivalence with min max imputation

* Decrease the likelihood of ties when training the trees

* More robust test

* Fix pytest parametrization

* Check bin thresholds in test

* Try to make the test even easier to see if the Linux 32bit build would pass in this case

* Don't check last non-missing bin if there's no nan

* Improve min-max imputation test

* FIX: _find_best_bin_to_split_right_to_left is still required even when left to right wants to split on nans

* comments

* remove split_on_nan

* ooops deleted useless files

* Got rid of individual checks in predictor code

+inf thresholds are only allowed in a split on nan situation.
Thresholds that are computed as +inf are capped to a very high constant
value

* can also remove special case in binning code

* minor typos + more consistent test

* renamed types -> common

* 1e300 -> almost inf

* added user guide section on missing values

* Addressed Olivier's comment + updated whatsnew

* addressed comments

* Fix doctest formatting

* Fix nan predictive doctest
2019-08-21 11:22:00 +02:00