Commit Graph

671 Commits

Author SHA1 Message Date
Daniela Fernandes 8fb8b444ce
TST Replace pytest.warns(None) in utils/tests/test_utils.py (#22961) 2022-03-27 13:47:13 +02:00
Jérémie du Boisberranger c6395d20e0
MNT Clean deprecation of dtype='numeric' + array of strings in check_array for 1.1 (#22589) 2022-03-22 14:50:11 -04:00
Jérémie du Boisberranger bb5ab53f94
API Config: change default display to "diagram" (#22856) 2022-03-21 15:43:07 +01:00
Dimitri Papadopoulos Orfanos ee5a1b69d1
DOC, MNT Typos found by codespell (#22906) 2022-03-20 19:16:39 +01:00
Jérémie du Boisberranger b9bd2d524d
API Deprecate if_delegate_has_method (#22830) 2022-03-17 13:16:53 -04:00
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
Thomas J. Fan 6511ef046f
FIX Fixes visualization for nested meta-estimators (#21310)
Co-authored-by: Jérémie du Boisberranger <34657725+jeremiedbb@users.noreply.github.com>
2022-03-14 18:22:59 +01:00
Thomas J. Fan 7f0006c8aa
ENH Adds infrequent categories to OneHotEncoder (#16018)
* ENH Completely adds infrequent categories

* STY Linting

* STY Linting

* DOC Improves wording

* DOC Lint

* BUG Fixes

* CLN Address comments

* CLN Address comments

* DOC Uses math to description float min_frequency

* DOC Adds comment regarding drop

* BUG Fixes method name

* DOC Clearer docstring

* TST Adds more tests

* FIX Fixes mege

* CLN More pythonic

* CLN Address comments

* STY Flake8

* CLN Address comments

* DOC Fix

* MRG

* WIP

* ENH Address comments

* STY Fix

* ENH Use functiion call instead of property

* ENH Adds counts feature

* CLN Rename variables

* DOC More details

* CLN Remove unneeded line

* CLN Less lines is less complicated

* CLN Less diffs

* CLN Improves readiabilty

* BUG Fix

* CLN Address comments

* TST Fix

* CLN Address comments

* CLN Address comments

* CLN Move docstring to userguide

* DOC Better wrapping

* TST Adds test to handle_unknown='error'

* ENH Spelling error in docstring

* BUG Fixes counter with nan values

* BUG Removes unneeded test

* BUG Fixes issue

* ENH Sync with main

* DOC Correct settings

* DOC Adds docstring

* DOC Immprove user guide

* DOC Move to 1.0

* DOC Update docs

* TST Remove test

* DOC Update docstring

* STY Linting

* DOC Address comments

* ENH Neater code

* DOC Update explaination for auto

* Update sklearn/preprocessing/_encoders.py

Co-authored-by: Roman Yurchak <rth.yurchak@gmail.com>

* TST Uses docstring instead of comments

* TST Remove call to fit

* TST Spelling error

* ENH Adds support for drop + infrequent categories

* ENH Adds infrequent_if_exist option

* DOC Address comments for user guide

* DOC Address comments for whats_new

* DOC Update docstring based on comments

* CLN Update test with suggestions

* ENH Adds computed property infrequent_categories_

* DOC Adds where the infrequent column is located

* TST Adds more test for infrequent_categories_

* DOC Adds docstring for _compute_drop_idx

* CLN Moves _convert_to_infrequent_idx into its own method

* TST Increases test coverage

* TST Adds failing test

* CLN Careful consideration of dropped and inverse_transform

* STY Linting

* DOC Adds docstrinb about dropping infrequent

* DOC Uses only

* DOC Numpydoc

* TST Includes test for get_feature_names_out

* DOC Move whats new

* DOC Address docstring comments

* DOC Docstring changes

* TST Better comments

* TST Adds check for handle_unknown='ignore' for infrequent

* CLN Make _infrequent_indices private

* CLN Change min_frequency default to None

* DOC Adds comments

* ENH adds support for max_categories=1

* ENH Describe lexicon ordering for ties

* DOC Better docstring

* STY Fix

* CLN Error when explicity dropping an infrequent category

* STY Grammar

Co-authored-by: Joel Nothman <joel.nothman@gmail.com>
Co-authored-by: Roman Yurchak <rth.yurchak@gmail.com>
Co-authored-by: Guillaume Lemaitre <g.lemaitre58@gmail.com>
2022-03-14 15:48:18 +01:00
Claudio Salvatore Arcidiacono 7a9677ee09
FIX Change error message of check_X_y when y is None (#22578)
Co-authored-by: Thomas J. Fan <thomasjpfan@gmail.com>
Co-authored-by: claudio.arcidiacono <claudio.arcidiacono@ing.com>
Co-authored-by: Julien Jerphanion <git@jjerphan.xyz>
2022-03-07 11:01:19 -05:00
Thomas J. Fan 3605c140af
FIX Support extra class_weights in compute_class_weight (#22595) 2022-03-07 10:31:25 +01:00
Thomas J. Fan 269bdb9489
MAINT Bump versions to match oldest-supported-numpy (#22674) 2022-03-04 18:51:39 +01:00
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
Thomas J. Fan 1fc86b6aac
MNT Update black to stable version (#22474) 2022-02-15 11:36:26 +01:00
Maxwell 648d18f16a
FIX skip tests when estimator has non_deterministic tag (#22318) 2022-02-14 23:17:03 -05:00
mathurinm e86644a324
API Lowercase estimator argument in check_estimator() (#22188)
Co-authored-by: Thomas J. Fan <thomasjpfan@gmail.com>
Co-authored-by: Guillaume Lemaitre <g.lemaitre58@gmail.com>
2022-02-14 10:40:51 +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
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
Thomas J. Fan 5f75acdd12
MNT Bump joblib version dependency to 1.0.0 (#22365) 2022-02-09 13:47:18 +01:00
Thomas J. Fan c0c504d105
FIX Only raise feature name warning with mixed types and strings (#22410) 2022-02-08 19:14:40 +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
mlant 1e4ac040ee
ENH added consistency checks for args of check_scalar function (#22027)
Co-authored-by: mlant <marie.lanternier@free.fr>
2022-01-25 12:04:18 -05:00
Tom Dupré la Tour 304a14783f
FIX Isomap with precomputed distances and disconnected graph (#21915)
Co-authored-by: Olivier Grisel <olivier.grisel@ensta.org>
2021-12-23 16:20:13 -05:00
Benjamin Bossan a3e0d4d79f
ENH make CalibratedClassifierCV accept on fit_params (#18170)
Co-authored-by: Julien Jerphanion <git@jjerphan.xyz>
Co-authored-by: BenjaminBossan <b.bossan@gmail.com>
Co-authored-by: Guillaume Lemaitre <g.lemaitre58@gmail.com>
2021-12-17 10:35:50 +01:00
Thomas J. Fan 299364c5c8
ENH Adds arrow on top level estimator in html repr (#21298) 2021-11-29 17:08:22 +01:00
Christian Lorentzen 3f717cc48a
[MRG] FIX segmentation fault on memory mapped contiguous memoryview (#21654) 2021-11-18 14:55:48 +01:00
Olivier Grisel ad7162a17a
MAINT fix test_check_classifiers_multilabel_output_format_predict_proba on [scipy-dev] (#21672) 2021-11-15 16:18:35 +01:00
Thomas J. Fan fe62250239
ENH Adds threadpoolctl info into show_versions (#21457)
Co-authored-by: Olivier Grisel <olivier.grisel@ensta.org>
2021-11-02 11:57:07 +01:00
Aurélien Geron 8fcf4ce603
FIX Escape `name_details` and add missing = (#21493) 2021-10-30 16:25:22 +02: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
krumetoft a41bb98f1d
TST Accelerates test_check_estimator_clones (#21498) 2021-10-29 08:38:41 -04:00
Thomas J. Fan bd87153741
ENH Adds float extension array support to check_array (#21278)
Co-authored-by: Olivier Grisel <olivier.grisel@gmail.com>
2021-10-28 23:06:40 +02:00
Thomas J. Fan d5db19718a
ENH Improves message for HTML repr when notebook is not trusted (#21316) 2021-10-21 16:18:38 +02:00
N 9cf246556e
FIX avoid scalar/array boolean operation in _IffHasAttrDescriptor (#21145) 2021-10-20 16:36:15 +02:00
Thomas J. Fan 6f91cbebe5
FIX Do not use deprecated API in fetch_20newsgroups_vectorized (#21216)
* FIX Do not use deprecated API in fetch_20newsgroups_vectorized

* BLD [scipy-dev]

* TST Be explicit about fill value [scipy-dev]

* TST Fixes tests for fill value

* [scipy-dev] trigger nightly build

Co-authored-by: Loïc Estève <loic.esteve@ymail.com>
2021-10-05 14:38:48 +02:00
Gabor Kertesz f33fb0af65
FIX Fixes test for checking gitignore and Cython templates (#20997) 2021-09-24 16:44:19 -04:00
Dimitri Papadopoulos Orfanos f71c031314
DOC Typos found by codespell (#21069) 2021-09-17 19:04:54 +02:00
András Simon 9c84abd771
ENH add `only_non_negative` parameter to `_check_sample_weight` (#20880)
Co-authored-by: Guillaume Lemaitre <g.lemaitre58@gmail.com>
Co-authored-by: Olivier Grisel <olivier.grisel@ensta.org>
2021-09-08 13:45:48 +02:00
Guillaume Lemaitre 8bf3aa58df
FIX change the meaning of include_boundaries in check_scalar (#20921)
Co-authored-by: Jérémie du Boisberranger <34657725+jeremiedbb@users.noreply.github.com>
Co-authored-by: Olivier Grisel <olivier.grisel@ensta.org>
2021-09-07 19:10:56 +02:00
Thomas J. Fan 4abd9f2d9e
API Implements get_feature_names_out for transformers that support get_feature_names (#18444)
Co-authored-by: Andreas Mueller <andreas.mueller@columbia.edu>
Co-authored-by: Andreas Mueller <andreasmuellerml@gmail.com>
Co-authored-by: Olivier Grisel <olivier.grisel@ensta.org>
Co-authored-by: Olivier Grisel <olivier.grisel@gmail.com>
Co-authored-by: Christian Lorentzen <lorentzen.ch@gmail.com>
2021-09-07 10:56:57 +02:00
Christian Lorentzen c0e5d1bc74
FEA add ReadonlyArrayWrapper (#20903)
Co-authored-by: jeremie du boisberranger <jeremiedbb@yahoo.fr>
2021-09-06 15:44:58 +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 a8d28274ef
MNT replace if_delagate_has_method by available_if in testing (#20686)
* MNT replace if_delagate_has_method by available_if in testing

* iter
2021-08-31 12:39:46 +02:00
Guillaume Lemaitre bd077e30ab
MNT use check_scalar to validate scalar in AffinityPropagation (#20723)
* MNT use check_scalar to validate scalar in AffinityPropagation

* refactor

* Apply suggestions from code review

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

* iter

* iter

* iter

* iter

* iter

Co-authored-by: Olivier Grisel <olivier.grisel@ensta.org>
2021-08-31 12:38:41 +02:00
Thomas J. Fan 786c4e5e39
DOC Adds feature_names_in_ to docstrings (#20787) 2021-08-26 13:44:45 +02:00
Adrin Jalali 3e7c04fe2c
ENH check_is_fitted calls __is_fitted__ if available (#20657) 2021-08-20 12:37:22 +02:00
Thomas J. Fan 416898b7f4
ENH Adds Column name consistency (#18010)
Co-authored-by: Olivier Grisel <olivier.grisel@ensta.org>
2021-08-17 14:48:21 +02:00
Guillaume Lemaitre d6735f4851
FIX accept large Python numeric in OrdinalEncoder (#20727) 2021-08-16 23:12:35 +02:00
Mathis Batoul 4b8cd88039
MAINT Improve source generation using `Tempita` (#20481)
Co-authored-by: Joan Massich <sik@visor.udg.edu>
Co-authored-by: Julien Jerphanion <git@jjerphan.xyz>
Co-authored-by: Olivier Grisel <olivier.grisel@ensta.org>
Co-authored-by: Guillaume Lemaitre <g.lemaitre58@gmail.com>
2021-08-09 21:43:56 +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
Guillaume Lemaitre a44e9a8ca6
TST check multilabel common check for supported estimators (#19859)
Co-authored-by: Julien Jerphanion <git@jjerphan.xyz>
2021-08-06 10:57:55 +02:00