Commit Graph

28 Commits

Author SHA1 Message Date
Julien Jerphanion 613773db11
TST Add minimal setup to be able to run test suite on float32 (#22690)
Co-authored-by: Thomas J. Fan <thomasjpfan@gmail.com>
Co-authored-by: Olivier Grisel <olivier.grisel@ensta.org>
Co-authored-by: Jérémie du Boisberranger <jeremiedbb@users.noreply.github.com>
2022-03-17 14:25:17 +01:00
Julien Jerphanion 6a16763c00
ENH Introduce `PairwiseDistancesReduction` and `PairwiseDistancesArgKmin` (feature branch) (#22134)
* MAINT Introduce Pairwise Distances Reductions private submodule  (#22064)

* MAINT Introduce FastEuclideanPairwiseArgKmin  (#22065)

* fixup! Merge branch 'main' into pairwise-distances-argkmin

Remove duplicated Bunch

* MAINT Plug `PairwiseDistancesArgKmin` as a back-end (#22288)

* Forward pairwise_dist_chunk_size in the configuration

* Flip finalized results for PairwiseDistancesArgKmin

The previous would have made the code more complex
by introducing some boilerplate for the interface plugs.

Having it this way actually simplifies the code.

This also removes the haversine branch for
test_pairwise_distances_argkmin

* Plug PairwiseDistancesArgKmin as a back-end

* Adapt test accordingly

* Add whats_new entry

* Change input validation order for kneighbors

* Remove duplicated test_neighbors_distance_metric_deprecation

* Adapt the documentation

* Add mahalanobis case to test fixtures

* Correct whats_new entry

* CLN Remove unneeded private metric attribute

This was needed when 'fast_sqeuclidean' and 'fast_euclidean'
were present to choose the best implementation based on the user
specification.

Those metric have been removed since then, making this attribute
useless.

* TST Assert FutureWarning instead of DeprecationWarning in
test_neighbors_metrics

* MAINT Add use_pairwise_dist_activate to scikit-learn config

* TST Add a test for the 'brute' backends' results' consistency

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

* fixup! MAINT Add use_pairwise_dist_activate to scikit-learn config

* fixup! fixup! MAINT Add use_pairwise_dist_activate to scikit-learn config

* TST Filter FutureWarning for WMinkowskiDistance

* MAINT pin numpydoc in arm for now (#22292)

* fixup! TST Filter FutureWarning for WMinkowskiDistance

* Revert keywords arguments removal for the GEMM trick for 'euclidean'

* MAINT pin max numpydoc for now (#22286)

* Add 'haversine' to CDIST_PAIRWISE_DISTANCES_REDUCTION_COMMON_METRICS

* fixup! Add 'haversine' to CDIST_PAIRWISE_DISTANCES_REDUCTION_COMMON_METRICS

* Apply suggestions from code review

* MAINT Document some config parameters for maintenance

Also rename one of them.

* FIX Support and test one of 'sqeuclidean' specification

Co-authored-by: Olivier Grisel <olivier.grisel@ensta.org>

* FIX Various typos fix and correct haversine

'haversine' is not supported by cdist.

* Directly use get_config

* CLN Apply comments from review

* Motivate swapped returned values

* TST Remove mahalanobis from test fixtures

* MNT Add comment regaduction functions' signatures

* TST Complete test for `pairwise_distance_{argmin,argmin_min}` (#22371)

* DOC Add sub-pull requests to the whats_new entry

* DOC place comment inside functions

* DOC move up whatsnew entry

Co-authored-by: Thomas J. Fan <thomasjpfan@gmail.com>
Co-authored-by: Christian Lorentzen <lorentzen.ch@gmail.com>
Co-authored-by: Olivier Grisel <olivier.grisel@ensta.org>
Co-authored-by: Jérémie du Boisberranger <jeremiedbb@users.noreply.github.com>
2022-02-17 10:37:22 +01:00
Thomas J. Fan 30c89280ce
MAINT Adjust tests for numpydoc 1.2 (#22287)
Co-authored-by: Julien Jerphanion <git@jjerphan.xyz>
Co-authored-by: Olivier Grisel <olivier.grisel@ensta.org>
2022-02-11 17:11:50 +01:00
Christian Lorentzen 3f717cc48a
[MRG] FIX segmentation fault on memory mapped contiguous memoryview (#21654) 2021-11-18 14:55:48 +01:00
Thomas J. Fan d1285a9232
DOC Adds missing imports into examples and test them (#21186) 2021-09-29 13:51:33 +02:00
Olivier Grisel 504682172b
MAINT deprecate assert_warns and assert_warns_messsage (#20521)
Co-authored-by: Guillaume Lemaitre <g.lemaitre58@gmail.com>
2021-07-20 15:01:16 +02:00
Thomas J. Fan 3ae7c76153
STY Enables black with experimental_string_processing=true (#20412) 2021-06-29 09:47:04 +02:00
Juan Martin Loyola 617ff6ef72
MAINT Remove unused variables indicated by lgtm.com (#20303) 2021-06-19 10:24:10 +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
Conner Shen 64bafa313e
FIX mcc zero divsion (#19977) 2021-06-03 12:15:30 +02:00
Andrew Delong a67b284f90
FIX Encoder should accept categories having dtype='S' (#19727)
Co-authored-by: Guillaume Lemaitre <g.lemaitre58@gmail.com>
2021-04-21 17:34:28 -04:00
Guillaume Lemaitre 255718b4ad
introduce _safe_tags for estimator not inheriting from BaseEstimator (#18797)
Co-authored-by: Nicolas Hug <contact@nicolas-hug.com>
Co-authored-by: Olivier Grisel <olivier.grisel@ensta.org>
2020-12-02 11:18:53 +01:00
Alexandre Gramfort 5263eea04d
ENH add support for sample_weights in StandardScaler when X is sparse (#18682) 2020-10-28 09:34:17 +01:00
Nicolas Hug 5721629fd3
MNT Use a pytest-like context manager in estimator_checks.py (#18418) 2020-09-28 15:05:43 -04:00
N. Haiat 0573aa1a3e
DOC Fix documentation of default values in sklearn.utils._testing.py (#18386)
Co-authored-by: Roman Yurchak <rth.yurchak@gmail.com>
2020-09-23 13:16:58 +02:00
Frans Larsson 6e56006a6a
DOC Fix default values for utils._testing.py (#18296) 2020-08-31 12:45:51 +02:00
Nicolas Hug 1931e142ed
Remove deprecated utils (#17133) 2020-05-20 22:03:54 +02:00
Christian Lorentzen a2ccc330bf
STY PEP8 fix E731 in linear_model/_logistic.py (#16786) 2020-03-30 17:49:40 +02:00
Adrin Jalali 42706ebf2d
MNT CI dropping python-3.5 (#15106)
* dropping python-3.5

* fix install guide

* fix setup.py

* fix circleci

* advanced_installation

* index.html

* readme

* pyparsing.py

* remove clean_warning_registry

* 1.13.1 and 1.19.1

* don't use 16.04

* 18.04 libatlas-dev -> libatlas-base-dev

* min pillow version for 3.6 is 4.2.1

* echo commands

* fix conflict, and 32 bit

* fix conflict for circle

* fix scikit-image version dep

* mark tests as xfail on 32bit py3.6

* move to 1.13.3 min numpy version, and simplify old code

* remove the rest of _object_dtype_isnan usages

* Revert "remove the rest of _object_dtype_isnan usages"

This reverts commit c6e867ea1f.

* fix issues raised by jeremy

* minor fix

* minor fixes mentioned by Olivier
2020-02-10 12:28:42 +01:00
Pierre Delanoue 4a3b4368d3
[DOC] Update random_state descriptions for mutual_info, unsupervised, .… (4) (#16320)
* Update random_state doc for mutual_info.py, unsupervised.py, testing.py and utils/init.py

* Update comments from pr

* Update sklearn/metrics/cluster/_unsupervised.py

Co-Authored-By: Jérémie du Boisberranger <34657725+jeremiedbb@users.noreply.github.com>

* Update sklearn/utils/__init__.py

Co-Authored-By: Jérémie du Boisberranger <34657725+jeremiedbb@users.noreply.github.com>

* Update sklearn/utils/__init__.py

Co-Authored-By: Jérémie du Boisberranger <34657725+jeremiedbb@users.noreply.github.com>

Co-authored-by: Jérémie du Boisberranger <34657725+jeremiedbb@users.noreply.github.com>
2020-02-07 13:00:41 +01:00
Guillaume Lemaitre a5542e9490 BUG fix pip3 ubuntu update by suffixing file (#15928) 2019-12-20 11:11:20 -05:00
Brian Wignall 0e10b3a3cb DOC Fix typos, via a Levenshtein-style corrector (#15923) 2019-12-19 16:26:02 -08:00
Nicolas Hug 42e17b3487 MNT Removed deprecated attributes and parameters -- ctnd (#15804) 2019-12-13 15:05:51 -05:00
Hanmin Qin dc111489a1
DOC correct some indents (#15875) 2019-12-13 11:51:17 +08:00
Nicolas Hug 4256542b10 MNT Removed deprecated attributes and parameters (#15803) 2019-12-09 22:17:06 +08:00
Guillaume Lemaitre c311efd501 FIX accept pandas Index for feature_names in PDP (#15639) 2019-11-18 06:39:43 -06:00
Nicolas Hug 19ad136223 MNT Replace DeprecationWarning with FutureWarning (#15080)
* bruteforce renaming

* WIP

* WIP

* some more

* removed weird line

* update -Werror

* testiforest

* again

* Fixed some tests

* fixed some tests

* removed -Werror

* fixed test_docstring_param issue

* fixed some tests

* some more

* renamed to SklearnDeprecationWarning

* pep8

* updated docs

* pep8

* merge

* changed to FutureWarning

* fixes

* Update doc/developers/tips.rst

Co-Authored-By: Adrin Jalali <adrin.jalali@gmail.com>

* avoid duplicates

* fixed warning for deprecations

* Still make CI break if DeprecationWarning isn't caught

* updated one warning

* fixed test

* fixed some renamings

* updated new dep warnings

* fixed bad import

* ignore warnings

* update again

* ignore futurewarning when walking packages

* Fixed test

* pep8

* Added whatsnew
2019-10-29 15:39:26 +01:00
Nicolas Hug b92455a6b2 MAINT Deprecate all of utils.testing except all_estimators (#15367) 2019-10-28 17:28:56 +01:00