Commit Graph

185 Commits

Author SHA1 Message Date
Jérémie du Boisberranger 34f9dbf541
MNT Clean fixes and compat for old versions of our dependencies (#22642)
Co-authored-by: Olivier Grisel <olivier.grisel@ensta.org>
2022-03-02 11:32:06 +01:00
Sam Adam Day 26d218cfeb
DOC Ensures that get_chunk_n_rows passes numpydoc validation (#22539) 2022-02-18 15:25:55 -05:00
Guillermo Tomás Fernández Martín 8abc6d890e
DOC Ensure that tosequence passes numpydoc validation (#22494)
Co-authored-by: Guillaume Lemaitre <g.lemaitre58@gmail.com>
2022-02-17 17:17:28 +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 1fc86b6aac
MNT Update black to stable version (#22474) 2022-02-15 11:36:26 +01:00
Adrin Jalali 1eb134e1c6
MNT move bunch to its own file (#22084) 2021-12-31 10:02:23 +01:00
katotten 9a0592fa33
fixed issues with documentation validation for sklearn.utils.check_pandas_support (#21566) 2021-11-06 09:12:59 +01:00
Ying Xiong 5256fb3649
[MRG] Support pd.NA in StringDtype columns for SimpleImputer (#21114)
Co-authored-by: Olivier Grisel <olivier.grisel@ensta.org>
2021-11-05 12:13:21 +01:00
Thomas J. Fan d1285a9232
DOC Adds missing imports into examples and test them (#21186) 2021-09-29 13:51:33 +02:00
Dimitri Papadopoulos Orfanos f71c031314
DOC Typos found by codespell (#21069) 2021-09-17 19:04:54 +02:00
Thomas J. Fan 057b82ed18
API Deprecates plot_partial_dependence (#20959)
* API Deprecates plot_partial_dependence

* DOC Adds whats new

* DOC Fixes doc build errors

* CLN Removes feature warning

* CLN Address comments

* DOC Fix docstrings

* TST Skip future warning tests

* DOC Adjust docstrings

* REV Reduce diff

* DOC Adds docstring
2021-09-09 14:25:59 +02:00
t-jakubek d5215a1535
Fixing integer overflow on 32-bit architectures. (#20904)
Co-authored-by: Julien Jerphanion <git@jjerphan.xyz>
2021-09-03 14:00:26 +02:00
Guillaume Lemaitre d6735f4851
FIX accept large Python numeric in OrdinalEncoder (#20727) 2021-08-16 23:12:35 +02:00
Joris Van den Bossche 6ab86fb34b
FIX Use take in safe_indexing for pandas to avoid SettingWithCopyWarning (#20673)
Co-authored-by: Guillaume Lemaitre <g.lemaitre58@gmail.com>
Co-authored-by: Olivier Grisel <olivier.grisel@ensta.org>
2021-08-09 12:00:45 +02:00
Thomas J. Fan 1013f930ef
MAINT Removes UserWarning when calling all_estimators (#20500) 2021-07-13 10:45:38 +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
Tom Dupré la Tour f6e6ad2d9e
MNT clean futurewarning for 1.0 | _deprecate_positional_args (#20002)
Co-authored-by: Olivier Grisel <olivier.grisel@ensta.org>
Co-authored-by: Thomas J. Fan <thomasjpfan@gmail.com>
2021-05-14 11:30:27 -04:00
Sean Benhur J 04f84c6d08
DOC Added utils.gen_batches in documentation (#19688) 2021-03-17 15:53:00 +01: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
Oleh Kozynets f9e0b7d55f
FIX VisibleDeprecationWarning in unit tests and docstrings (#18414) 2020-10-28 14:47:57 +01:00
Ryotaro Tsukada 27f11e7f17
DOC Fix typo in docstring for check_pandas_support (#18688) 2020-10-26 22:36:50 -04:00
Albert Villanova del Moral 647fcb1ac1
DOC Fix A to uppercase in See Also docstring section (#18332) 2020-09-04 10:35:01 -04:00
Anand Tiwari 2738e381ea
DOC fix erroneous statement regarding meta-estimator in all_estimators (#18231)
Co-authored-by: anandt <anandt@cvent.com>
Co-authored-by: Guillaume Lemaitre <g.lemaitre58@gmail.com>
2020-08-31 10:51:12 +02:00
Frans Larsson 8b6555f9c1
DOC Add None as valid option to random_state for utils module (#18253) 2020-08-25 08:44:46 +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
Joseph Lucas cacf6bfae2
ENH Added keyword arguments to Shuffle (#17474)
Added random_state and n_samples
Modified documentation to reflect default values
Modified call to resample
2020-06-06 17:55:56 -04:00
Juan Carlos Alfaro Jiménez f42cf8a2bc
MNT Replace kwargs by named args for resample (#17324) 2020-05-26 07:48:50 +10:00
Nicolas Hug 1931e142ed
Remove deprecated utils (#17133) 2020-05-20 22:03:54 +02:00
Thomas J Fan e770715c43
MNT Completes position arg deprecation (#17272)
* ENH Adds public functions with position args warning

* BUG Circlar import

* STY

* BUG Add keywords

* BUG Fixes warnings

* ENH Adds other public functions

* CLN Suggestion

* CLN Suggestion

* REV Revert pairwise

* ENH Positoinal args for compute_class_weight
2020-05-19 09:07:25 +02:00
Thomas J Fan ee2508ce45
ENH Adds HTML visualizations for estimators (#14180) 2020-04-30 08:31:58 +10:00
Nicolas Hug 76ef8b0ef0
API kwonly for utils (#17046)
* kwonly for utils

* More

* fixed some

* some more

* iwannagohomepls

* accept_sparse not kwonly anymore
2020-04-27 15:42:01 +02:00
Roman Yurchak f621d8a392
Revert "API kwonly for utils (#17007)" (#17045) 2020-04-26 18:30:09 +02:00
Nicolas Hug 81c1e9d1f2
API kwonly for utils (#17007) 2020-04-26 18:05:16 +02:00
Roman Yurchak 1cbe59ee06
CI Check for unused imports when linting (#16678)
* Check for missing imports in linting

* Exclude externals

* Remove unused imports
2020-03-12 12:56:35 +01:00
CastaChick ca78d75e75
DOC Fixed documents that refer to Bunch object #16438 (#16447)
* Added links to utils.Bunch and fixed format of the docstring in datasets

* Added links to utils.Bunch in sklearn.compose

* Added links to utils.Bunch in sklearn.tree

* Added links to utils.Bunch in sklearn.ensemble

* Added links to utils.Bunch in sklearn.inspection

* Added links to utils.Bunch in sklearn.pipeline

* modified docstring of Bunch

* Added links to utils.Bunch to index.rst of sklearn.datasets

* Fixed some docstrings because the lines are too long

* Fixed some points as reviewed.

* Add links and delete 'for more information...'

* Fixed indent

* Fixed forgotten points.

* Fixed some points as reviewed.
2020-02-27 10:04:04 +01:00
Thomas J Fan f703b85814
ENH Improves efficiency of ColumnTransformer for string keys (#16431) 2020-02-21 21:49:11 +01:00
Adrin Jalali 2821abc76c
DOC add Bunch to public docs and API (#16404)
* add Bunch to public docs and API

* address Thomas's suggestions

* use Thomas's description
2020-02-11 15:46:27 +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
bernie gray c45721d538 ENH check for invalid batch_size in gen_batches (#16181) 2020-01-27 09:24:50 +01:00
alexshacked c4ea377198 FIX ensure object array are properly casted when dtype=object (#16076) 2020-01-14 18:06:50 -08:00
Nicolas Hug 4256542b10 MNT Removed deprecated attributes and parameters (#15803) 2019-12-09 22:17:06 +08:00
Thomas J Fan 4ce39dbc69 BUG Returns only public estimators in all_estimators (#15380) 2019-12-06 14:18:55 +01:00
Nicolas Hug ad80d3159a DEP Remove deprecated joblib tools in utils (#15792) 2019-12-06 13:59:46 +01:00
Guillaume Lemaitre 7ea7861482 ENH Add support for dataframe in PDP (#14028) 2019-10-31 12:24:39 -04: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
Chiara Marmo 871b251623 DOC Sphinx Unexpected unindent warnings (#15130) 2019-10-04 10:56:32 -04:00
Nicolas Hug 96c988cdde
MNT Make safe_indexing private (#15104) 2019-10-02 11:47:46 -04:00