Commit Graph

1261 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
Dimitri Papadopoulos Orfanos ee5a1b69d1
DOC, MNT Typos found by codespell (#22906) 2022-03-20 19:16:39 +01:00
ShanDeng123 0f3837605f
TST Replaces pytest.warns(None) in test_feature_agglomeration (#22871)
Co-authored-by: Shan-Deng <45984816+Shan-Deng@users.noreply.github.com>
2022-03-17 14:18:08 +01:00
ShanDeng123 2c2f31d68c
TST Replaces pytest.warns(None) in test_optics (#22831)
Co-authored-by: Shan-Deng <45984816+Shan-Deng@users.noreply.github.com>
2022-03-14 13:36:27 -04:00
Dimitri Papadopoulos Orfanos 3d4ee9e9dc
MNT Remove utf-8 encoding declarations (#21260)
Co-authored-by: Jérémie du Boisberranger <34657725+jeremiedbb@users.noreply.github.com>
2022-03-14 17:59:36 +01:00
Jérémie du Boisberranger 09a72930b8
add num_threads in kmeans init_bounds (#22773) 2022-03-14 15:15:35 +01:00
Olivier Grisel d3429ca328
TST introducing the random_seed fixture (#22749)
Co-authored-by: Julien Jerphanion <git@jjerphan.xyz>
Co-authored-by: Thomas J. Fan <thomasjpfan@gmail.com>
Co-authored-by: Jérémie du Boisberranger <34657725+jeremiedbb@users.noreply.github.com>
2022-03-14 10:41:06 +01:00
Thomas J. Fan 6904ae3064
TST Convert warnings into errors in test_affinity_propgation (#22824) 2022-03-14 10:06:29 +01:00
ShanDeng123 4a3f63f8a2
TST Replaces pytest.warns in test_affinity_propagation (#22819)
Co-authored-by: Shan-Deng <45984816+Shan-Deng@users.noreply.github.com>
2022-03-13 17:30:35 -04:00
Raz Hoshia ae98150e41
FIX DBSCAN and TSNE are missing the pairwise estimator tag (#22814) 2022-03-13 19:22:11 +01:00
Matteo Francia 0776ca7226
DOC Fix typo in _kmeans.py (#22736) 2022-03-09 10:00:26 -05:00
Jérémie du Boisberranger 6ab950ec08
MNT Refactor KMeans and MiniBatchKMeans to inherit from a common base class (#22723)
Co-authored-by: Thomas J. Fan <thomasjpfan@gmail.com>
Co-authored-by: Julien Jerphanion <git@jjerphan.xyz>
2022-03-09 11:50:25 +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 f1d3417b08
MNT Drops Python 3.7 in CI, wheel building, and docs (#22617)
* MNT Drops Python 3.7

* MNT Bump NumPy and SciPy

* FIX Fix build

* FIX Bump versions improved

* DOC Fixes numpy version [pypy]

* BLD [pypy] [icc-build]

* Update docs

* MAINT use scipy.optimize.LinearConstraint in test

* MAINT scipy 1.1.0 related code clean-up

* scipy>=1.3.2 in pyproject.toml's build deps

* [cd build]

* DOC Adds comment about pypy

* MAINT remove _astype_copy_false

* FIX Update check for python version in setup.py

Co-authored-by: Olivier Grisel <olivier.grisel@ensta.org>
2022-02-28 18:23:02 +01:00
Thomas J. Fan 5d1571db5c
FIX Supports numpy strings and array-like in KMean.init (#22154)
Co-authored-by: Jérémie du Boisberranger <34657725+jeremiedbb@users.noreply.github.com>
2022-02-15 17:35:40 +01:00
Thomas J. Fan 1fc86b6aac
MNT Update black to stable version (#22474) 2022-02-15 11:36:26 +01:00
Thomas J. Fan 4ff0767087
ENH Better error message for check_scalar (#22218)
Co-authored-by: Guillaume Lemaitre <g.lemaitre58@gmail.com>
2022-02-11 16:15:30 +01:00
Guillaume Lemaitre 229bd226ab
MNT remove _pairwise attribute (#21594) 2022-02-09 16:58:01 +01:00
Thomas J. Fan 9f85c9d449
TST Better info when checking for no warnings in tests (#22362) 2022-02-03 11:42:48 +01:00
Olivier Grisel 581a66316a
TST More info in test_affinity_propagation_convergence_warning (#22361) 2022-02-02 12:52:23 -05:00
Meekail Zain 27dda7a9a6
ENH Set Affinity propagation labels if any clusters were found (#22217)
Co-authored-by: Thomas J. Fan <thomasjpfan@gmail.com>
2022-02-02 12:16:08 -05:00
Nadirhan Şahin 604bc5c605
MNT use check_scalar in SpectralBiClustering and SpectralCoClustering (#20817)
Co-authored-by: Thomas J. Fan <thomasjpfan@gmail.com>
Co-authored-by: Guillaume Lemaitre <g.lemaitre58@gmail.com>
2022-01-31 11:30:13 +01:00
Guillaume Lemaitre 1ba0f54c7c
MNT remove deprecated attributes in KMeans (#21583) 2022-01-29 11:07:27 +01:00
Meekail Zain 254ea8c453
ENH Replaced RandomState with Generator compatible calls (#22271) 2022-01-28 15:49:34 -05: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 5219b6f479
ENH Adds get_feature_names to cluster module (#22255) 2022-01-28 14:58:23 +01:00
Moonkyung94 4a4d135e7f
DOC Ensures sklearn.cluster. spectral.spectral clustering numpydoc validation (#22025)
Co-authored-by: Guillaume Lemaitre <g.lemaitre58@gmail.com>
2022-01-28 14:26:37 +01:00
Moonkyung94 ac6273ee3d
DOC improve docstring in OPTICS functions (#22024)
Co-authored-by: Guillaume Lemaitre <g.lemaitre58@gmail.com>
2022-01-24 17:26:02 +01:00
Ayan Bag 3db677ff34
DOC Ensures that compute_optics_graph passes numpydoc validation (#22205)
Co-authored-by: Juan Martin Loyola <jmloyola@outlook.com>
2022-01-21 18:16:56 +01:00
Yar Khine Phyo 49043fc769
[MRG] Deprecate WMinkowskiDistance & make MinkowskiDistance accept weights (#21873)
Co-authored-by: Olivier Grisel <olivier.grisel@ensta.org>
Co-authored-by: Julien Jerphanion <git@jjerphan.xyz>
2022-01-20 16:30:00 +01:00
Atharva Patil fdf5533ca2
DOC Ensures that cluster_optics_xi passes numpydoc validation (#22202) 2022-01-13 14:01:23 -05:00
Atharva Patil be89eb75f2
DOC Ensures that kmeans_plusplus passes numpydoc validation (#22200) 2022-01-13 10:58:27 -05:00
hvassard 26e2c38a96
[MRG] MNT use check_scalar to validate scalar in SpectralClustering (#21881)
* use check_scalar in SpectralClustering

* Add check_scalar parameters validation for cluster.SpectralClustering

* fix missing comma

* tiny changelog update to relauch CI

* errors are raised at fit time solely

Co-authored-by: Julien Jerphanion <git@jjerphan.xyz>

* fix typos

Co-authored-by: Julien Jerphanion <git@jjerphan.xyz>

* merge ..utils imports

Co-authored-by: Julien Jerphanion <git@jjerphan.xyz>

Co-authored-by: hvassard <hugo.vassard@insa-rouen.fr>
Co-authored-by: Julien Jerphanion <git@jjerphan.xyz>
2022-01-07 22:09:43 +01:00
Thomas J. Fan c010d9a5a7
MAINT Use push_back directly in dbscan_inner (#22077) 2021-12-31 11:52:13 +01:00
melemo2 cece90e57c
DOC Ensures that get_bin_seeds passes numpydoc validation (#22018)
Co-authored-by: Thomas J. Fan <thomasjpfan@gmail.com>
2021-12-19 12:21:45 -05:00
melemo2 9189ff25f8
DOC Ensures that mean_shift passes numpydoc validation (#22019) 2021-12-19 09:12:42 -05:00
Christos Aridas 0bb45fd11a
FIX Fix the error message when using precomputed affinity in AgglomerativeClustering (#21974) 2021-12-15 12:24:09 +01:00
melemo2 6c9f1650e3
fix letter case (#21940) 2021-12-10 10:20:44 +01:00
Thomas J. Fan 5ddf7a8c80
MNT Add extern to avoid build warning in _dbscan_inner.pyx (#21822) 2021-12-09 17:17:41 +01:00
Thomas J. Fan 071f98f0a7
FIX Remove warnings when fitting a dataframe (#21578)
Co-authored-by: Olivier Grisel <olivier.grisel@ensta.org>
2021-11-29 17:55:37 +01:00
Aurélien Geron bacc91cf1d
MNT Make algorithm='auto' default to using 'full' instead of 'elkan' (#21735)
Co-authored-by: Guillaume Lemaitre <g.lemaitre58@gmail.com>
2021-11-25 19:16:21 +01:00
Reshama Shaikh c00e46b616
DOC Ensures that function passes numpydoc validation: affininity_propagation (#21778) 2021-11-25 14:45:10 +01:00
Olivier Grisel f924bc8a1d
FIX wminkowski removed in 1.8.0.dev0 (#21741)
Co-authored-by: Julien Jerphanion <git@jjerphan.xyz>
2021-11-23 22:05:16 +01:00
Christian Lorentzen f7f0a2f4f6
FIX out of bounds error on X_indptr in kmeans (#21662) 2021-11-16 15:18:12 +01:00
Thomas J. Fan 60cf98bc89
FIX Ignore distutils warning in [scipy-dev] + fix numpy 1.22 support in OneHotEncoder (#21517)
Co-authored-by: Olivier Grisel <olivier.grisel@ensta.org>
2021-11-04 12:17:50 +01:00
Tyler Martin 39566fea97
FIX Fixed infinite loop in cluster._spectral.discretize (#21271)
Co-authored-by: Thomas J. Fan <thomasjpfan@gmail.com>
Co-authored-by: Guillaume Lemaitre <g.lemaitre58@gmail.com>
2021-11-03 17:04:34 +01:00
Jérémie du Boisberranger 1f8825c8dd
MNT Centralize common cython compiler directives (#21512) 2021-11-03 13:26:23 +01:00
Andrew Knyazev f449af888e
ENH add 'cluster_qr' method to spectral segmentation (#21148)
Co-authored-by: Olivier Grisel <olivier.grisel@ensta.org>
Co-authored-by: Victor Minden <victorminden@gmail.com>
Co-authored-by: Julien Jerphanion <git@jjerphan.xyz>
2021-11-02 11:32:14 +01:00
Olivier Grisel 2571cb2989
Improve validation messages with infinite data (#21219)
* Improve validation messages with infinite data

* Extend and fix validation tests

* Test and fix extended error message

* data_name => input_name

* Mention estimators that natively support missing values

* More informative error message

* cosmetic

* typo

* Fix broken tests

* Fix test_knn

* Add changelog entry

* Fix broken test for param search models

* Missing input names

* Allow Y and y in estimator checks

* Add missing input names

* Fix input_name for FunctionTransformer

* More missing input names

* Update test

* More test fixes on scores

* Simplify message to avoid to make generic fallback meaningful

Co-authored-by: Thomas J. Fan <thomasjpfan@gmail.com>

* More informative estimator checks failure messages

* Make sure the estimator name is passed correctly in _validate_data

* Simplify calls to _validate_data

* Handle estimator name in private _check_y helper

* More specific error message

* Add estimator to check_X_params and check_y_params

* Add .. versionadded flags in public docstrings

* Update changelog

* Improve _validate_data's docstring

* Typo in doc/whats_new/v1.1.rst

* Make _check_estimator_name return None if estimator == None

Co-authored-by: Thomas J. Fan <thomasjpfan@gmail.com>

* check_params dict updates with style

* Increase test coverage

Co-authored-by: Thomas J. Fan <thomasjpfan@gmail.com>
2021-10-29 15:59:57 +02:00
Vikas Vishwakarma c723d94ac6
DOC Ensures that SpectralCoclustering passes numpydoc validation (#21463) 2021-10-26 18:36:56 +02:00