Commit Graph

334 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
Gabriel Stefanini Vicente ffa0898d5a
API Add data_transposed argument and warning to make_sparse_coded_signal (#21425)
Co-authored-by: Andreas Mueller <t3kcit@gmail.com>
Co-authored-by: jeremie du boisberranger <jeremiedbb@yahoo.fr>
Co-authored-by: Jérémie du Boisberranger <34657725+jeremiedbb@users.noreply.github.com>
2022-03-22 16:01:42 +01:00
Thomas J. Fan c176beadf8
MAINT Import from public SciPy in pubilc namespace (#22875)
Co-authored-by: Olivier Grisel <olivier.grisel@ensta.org>
2022-03-17 11:59:23 +01:00
JSchuerz 4a52eb6de9
DOC Use :doi: and :arxiv: directives for references (#22603)
Co-authored-by: Chiara Marmo <cmarmo@users.noreply.github.com>
Co-authored-by: Jérémie du Boisberranger <34657725+jeremiedbb@users.noreply.github.com>
2022-03-02 15:15:44 +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
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 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
Thomas J. Fan 9a13bdfaf1
MNT Adds black config and fixes formatting before black (#19031)
Co-authored-by: Roman Yurchak <rth.yurchak@gmail.com>
Co-authored-by: Christian Lorentzen <lorentzen.ch@gmail.com>
2021-06-12 17:14:09 +02:00
solosilence 5c3cb6b0af
STY Changing .format method to f-string formatting (#20215) 2021-06-07 20:59:59 -04:00
Sylvain Marié bf0886bae0
[MRG after #12145] Add "Randomized SVD" solver option to KernelPCA for faster partial decompositions, like in PCA (#12069)
Co-authored-by: Sylvain MARIE <sylvain.marie@se.com>
Co-authored-by: Thomas J Fan <thomasjpfan@gmail.com>
Co-authored-by: Nicolas Hug <contact@nicolas-hug.com>
Co-authored-by: Joel Nothman <joel.nothman@gmail.com>
Co-authored-by: Olivier Grisel <olivier.grisel@ensta.org>
Co-authored-by: Olivier Grisel <olivier.grisel@gmail.com>
Co-authored-by: Tom Dupré la Tour <tom.dupre-la-tour@m4x.org>
2021-04-27 16:06:10 +02:00
Nicolas Hug 309f135c32
MNT Remove HistGradientBoosting from experimental (#19799) 2021-04-02 16:40:20 +02:00
Albert Thomas c854b83c91
[MRG] Linear One-Class SVM using SGD implementation (#10027)
Co-authored-by: Tom Dupré la Tour <tom.dupre-la-tour@m4x.org>
Co-authored-by: Olivier Grisel <olivier.grisel@ensta.org>
2021-03-23 10:53:57 +01:00
Christian Lorentzen b9d6db81ec
[MRG] ENH Consistent loss name for squared error (#19310) 2021-03-19 15:21:34 +01:00
Gaurav Desai da562b4fa5
MNT initialize weights when using ARPACK solver with a utility (#18302)
Co-authored-by: Ivan PANICO <ivpanico@gmail.com>
Co-authored-by: Ivan Panico <iv.panico@gmail.com>
Co-authored-by: Thomas J. Fan <thomasjpfan@gmail.com>
Co-authored-by: Guillaume Lemaitre <g.lemaitre58@gmail.com>
2020-11-27 18:25:35 +01: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 06d6f8a9f6
FIX Passes global configuration when spawning joblib jobs (#17634)
* WIP

* BUG Passes context to joblib jobs

* BUG Fix

* BUG Fix

* CLN Moves delayed into fixes

* CLN Adds linter

* REV Revert diff

* DOC Adds comment for removal

* Use a simple implementation
2020-09-21 16:59:42 +02:00
Olivier Grisel 68fb4db2cc
BENCH threading scalabikity of HGBRT (#18382) 2020-09-15 16:55:43 +02:00
Ram Rachum 61ec6b9b79
MNT Use raise from in 19 modules (#17835) 2020-08-25 08:57:29 +02:00
Daniel López daebcac781
FEA Add PolynomialCountSketch to Kernel Approximation module (#13003)
* Add Tensor Sketch algorithm

* Add user guide entry

* Add example

* Add benchmark

Co-authored-by: Christian Lorentzen <lorentzen.ch@googlemail.com>
Co-authored-by: Tom Dupré la Tour <tom.dupre-la-tour@m4x.org>
Co-authored-by: Roman Yurchak <rth.yurchak@gmail.com>
2020-08-18 08:44:20 +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
Nicolas Hug 0a866ecaa9
MNT New options for higgs-boson benchmark (#16779) 2020-03-27 12:02:25 -04:00
Nicolas Hug 913da3f286
MNT Fix higgs boson benchmark (#16740) 2020-03-22 10:08:33 +01:00
Adrin Jalali e24998f19c
ENH Support sample weights in HGBT (#14696) 2020-02-24 13:45:50 -05:00
Thomas J Fan ae0dcddce8
BUG Fixes benchmark script for early stopping (#16476) 2020-02-19 00:05:23 +01:00
Brian Wignall 0e10b3a3cb DOC Fix typos, via a Levenshtein-style corrector (#15923) 2019-12-19 16:26:02 -08:00
Leland McInnes db59dd74df [MRG] Fast, low memory, single linkage implementation (#11514)
* First cut at basic single linkage internals

* Refer to correct dist_metrics package

* Add csgraph sparse implementation for single linkage

* Add fast labelling/conversion from MST to single linkage tree; remove uneeded single_linkage.pyx file.

* Ensure existing tests cover single linkage

* Name cingle linkage labelling correctly.

* Iterating toward correct solution. Still have to get n_clusters, compute_full_tree=False working

* Get n_components correct.

* Update docstrings.

* Fix the parents array when we don't get the "full tree"

* Add single linkage to agglomerative clustering example.

* Add single linkage to digits agglomerative clustering example.

* Update documentation to reflect the addition of single linkage.

* Update documentation to reflect the addition of single linkage.

* Pep8 fix for class declaration in cython

* Fix heading in clustering docs

* Update the digits clustering text to reflect the new reality.

* Provide a more complete comparison of the different linkage methods, highlighting the relative strengths and weaknesses.

* We don't need connectivity here, and we can ignore issues with warnings for spectral clustering.

* Add an explicit test that single linkage successfully works on examples it should perform well on.

* Update docs with a more complete comparison on linkage methods (scale to be determined?)

* List formatting in example linkage comparison.

* Flake8 fixes.

* Flake8 fixes.

* More Flake8 fixes.

* Fix agglomerative plot example with correct subplot spec

* Explicitly test linkages (including single) produce results identical to scipy.cluster.hierarchical

* Fix comment on why we sort (consistency)

* Make dense single linkage faster

* Add docstring to new mst-linkage-core computations.

* Add a test that new single linkage code matches scipy

* Ensure we only attemtp this for metrics Jake implemented.

* Per amueller; it's a long paper, ref the figure.

* Clean up a few things.

* Too many blank lines for flake8

* Bad scipy slink input

* Flake8 fixes

* Clean up cython a little; fix typo/carryover

* Convert memoryview to numpy array on return

* Just convert to the correct dtype

* Update sklearn/cluster/_hierarchical.pyx

Co-Authored-By: Nicolas Hug <contact@nicolas-hug.com>

* Update sklearn/cluster/_hierarchical.pyx

Co-Authored-By: Nicolas Hug <contact@nicolas-hug.com>

* Update sklearn/cluster/_hierarchical.pyx

Co-Authored-By: Nicolas Hug <contact@nicolas-hug.com>

* Update sklearn/cluster/tests/test_hierarchical.py

Co-Authored-By: Nicolas Hug <contact@nicolas-hug.com>

* Fixes as per @NicolasHug suggestions.

* Update renaming of params in test_hierarchical

* Relative import?

* Ah, it got renamed in master...

* A bad merge on my part.

* In principle this is in sklearn.neighbors now...

* No; not that way...

* Declare dim before use.

* Update sklearn/cluster/tests/test_hierarchical.py

Co-Authored-By: Nicolas Hug <contact@nicolas-hug.com>

* Remaining fixes per Nicolas Hug.

* Update sklearn/cluster/tests/test_hierarchical.py

Co-Authored-By: Nicolas Hug <contact@nicolas-hug.com>

* Fix flake8 issues.

* Switch from stable to mergesort per jnotham

* Update sklearn/cluster/_hierarchical.py

Co-Authored-By: Nicolas Hug <contact@nicolas-hug.com>

* Skip checks that are already validated.

* Update docstring per Gael's suggestion

* Add a benchmark script for agglomerative clustering

* Fix some flake8 issues

* No flake8 on the one line

* Update parameters and output for benchmark hierarchical

* Switch to 2D plotting for hierarchical benchmark

* Wrong colormap name

* Formatting fpr bench hierarchical

* Add an item to WhatsNew
2019-11-21 22:55:57 -05:00
Nicolas Hug 839a2a2fbf MNT import kmeans from sklearn.cluster (#15407) 2019-10-30 16:34:27 +01:00
Thomas Moreau 908ded83c8 ENH Parallelize gradient computation in t-SNE (#13264) 2019-10-30 10:17:10 -04:00
Nicolas Hug b92455a6b2 MAINT Deprecate all of utils.testing except all_estimators (#15367) 2019-10-28 17:28:56 +01:00
Thomas J Fan 5756a9934b MNT Make modules private in decomposition (#15344) 2019-10-28 22:46:16 +08:00
Thomas J Fan 4a95e33e63 MNT Make modules private in sklearn.datasets (#15307) 2019-10-27 17:17:23 -04:00
Thomas J Fan 0a7adef005 MNT Make modules private in linear_model (#15324) 2019-10-23 15:34:26 +02:00
Nicolas Hug 5cf88db244 EHN Implement least absolute deviation loss in GBDTs (#13896) 2019-09-09 10:26:52 +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
Andreas Mueller 92af3dabbb MAINT simplify check_is_fitted to use any fitted attributes (#14545) 2019-08-13 22:09:07 +02:00
qdeffense f13c9c0752 CLN remove redundant default parameters in examples and tests (#14590)
remove redundant 'fit_intercept=True' in examples and tests along with some instances of other redundant parameters (max_iter=100, C=1 and alpha=1.0)
2019-08-07 10:38:41 -07:00
Harsh Mahajan 228109cd5c MAINT Remove tolerance paramter from Perceptron (#14558) 2019-08-02 16:11:46 -04:00
Harsh Mahajan 38fd24ac1e EXA Remove redundant tol parameter for SGDClassifier (#14556) 2019-08-02 14:04:10 -04:00
Tilen Kusterle a8efe00876 EXA Use return_X_y=True with load_digits where appropriate (#14359) 2019-07-14 17:10:54 +02:00
Roman Yurchak 2fc3a85b3f MAINT Use isinstance(x, numbers.Integral) to check for integer dtype (#14004) 2019-06-12 19:24:59 -04:00
Roman Yurchak ccd3331f7e MNT remove unused imports (#14021) 2019-06-04 23:15:19 +10:00
Guillaume Lemaitre 778b11904e [MRG] DEP remove threshold_, change contamination, deprecate behaviour in iforest (#13811) 2019-05-22 12:41:47 +10:00
Guillaume Lemaitre af4247b152 DEP remove utilities related to mldata (#13798) 2019-05-21 18:37:09 +10:00
Guillaume Lemaitre 8a8e21b2a3 MNT Change the default value of n_estimators in forests (#13803) 2019-05-09 21:19:20 +08:00
Nicolas Hug 9f68c992ae [MRG+2] Faster Gradient Boosting Decision Trees with binned features (#12807) 2019-04-26 21:14:59 +02:00
Kuai Yu fec7670ad0 ENH Enable the "sufficient stats" mode of LARS (#11699) 2019-03-06 08:06:47 +01:00
Joan Massich f02ef9f52f LogisticRegression convert to float64 (for SAG solver) (#13243)
* Remove unused code

* Squash all the PR 9040 commits

initial PR commit

seq_dataset.pyx generated from template

seq_dataset.pyx generated from template #2

rename variables

fused types consistency test for seq_dataset

a

sklearn/utils/tests/test_seq_dataset.py

new if statement

add doc

sklearn/utils/seq_dataset.pyx.tp

minor changes

minor changes

typo fix

check numeric accuracy only up 5th decimal

Address oliver's request for changing test name

add test for make_dataset and rename a variable in test_seq_dataset

* FIX tests

* TST more numerically stable test_sgd.test_tol_parameter

* Added benchmarks to compare SAGA 32b and 64b

* Fixing gael's comments

* fix

* solve some issues

* PEP8

* Address lesteve comments

* fix merging

* avoid using assert_equal

* use all_close

* use explicit ArrayDataset64 and CSRDataset64

* fix: remove unused import

* Use parametrized to cover ArrayDaset-CSRDataset-32-64 matrix

* for consistency use 32 first then 64 + add 64 suffix to variables

* it would be cool if this worked !!!

* more verbose version

* revert SGD changes as much as possible.

* Add solvers back to bench_saga

* make 64 explicit in the naming

* remove checking native python type + add comparison between 32 64

* Add whatsnew with everyone with commits

* simplify a bit the testing

* simplify the parametrize

* update whatsnew

* fix pep8
2019-02-27 11:14:29 +01:00