* Initial implementation
* Improved error handling and stability
* Added unit tests
* Updated test to use `max_features_` instead of `max_features`
* Added documentation for new private attribute `max_features_`
* Improved error handling for callables
* Updated whats_new
* Removed incorrect term reference to `max_features`
* Removed float case and improved testing
* Updated test names to more clearly reflect intention
* Added a sample callable in `max_features` description
* Improved documentation and streamlined error handling
* Updated example to include demonstrate using a callable for max_features
* Separated out callable demo into separate example
* Removed demo from `max_features` docs (now in example)
* Updated changelog
* Apply suggestions from code review
Co-authored-by: Thomas J. Fan <thomasjpfan@gmail.com>
* Trimmed unneeded comments
* Updated tests to reflect new error handling
* Removed new line at end of docstring
* Updated docstring
* Fixed example syntax error
* Fixed example syntax
* Apply suggestions from code review
Co-authored-by: Thomas J. Fan <thomasjpfan@gmail.com>
* Reverted irrelevant changes
* Update sklearn/feature_selection/_from_model.py
Co-authored-by: Thomas J. Fan <thomasjpfan@gmail.com>
* Fixed error message
* Improved test coverage
* Minor doc improvement -- added a list for `max_features` type
* Update sklearn/feature_selection/_from_model.py
Co-authored-by: Adrin Jalali <adrin.jalali@gmail.com>
* Improved input validation and added test for array-like
* Updated doc to use no longer use lambda function
* Fixed docstring list
* Added missing whitespace for list format in docstring
Co-authored-by: Thomas J. Fan <thomasjpfan@gmail.com>
Co-authored-by: Adrin Jalali <adrin.jalali@gmail.com>
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>
Co-authored-by: Thierry Gameiro <titigmr@MacBook-Air-de-Thierry.local>
Co-authored-by: titigmr <thierry.gmr@outlook.fr>
Co-authored-by: Thomas J. Fan <thomasjpfan@gmail.com>
Co-authored-by: Olivier Grisel <olivier.grisel@ensta.org>
Co-authored-by: Nicolas Hug <contact@nicolas-hug.com>
Co-authored-by: Guillaume Lemaitre <g.lemaitre58@gmail.com>
Co-authored-by: Thomas J. Fan <thomasjpfan@gmail.com>
Co-authored-by: bmreiniger <40676050+bmreiniger@users.noreply.github.com>
* 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>
Co-authored-by: arka204 <kmichalik204@gmail.com>
Co-authored-by: Thomas J. Fan <thomasjpfan@gmail.com>
Co-authored-by: Guillaume Lemaitre <g.lemaitre58@gmail.com>
Co-authored-by: rasbt <mail@sebastianraschka.com>
Co-authored-by: Thomas J. Fan <thomasjpfan@gmail.com>
Co-authored-by: Guillaume Lemaitre <g.lemaitre58@gmail.com>
* added code from PR #14627
* fixed error handling None as n_features_to_select
* added test for error message and percentage passing
* linting
* more linting
* even more linting
* sklearn/feature_selection/_rfe.py make int casting simpler
Co-authored-by: Roman Yurchak <rth.yurchak@gmail.com>
* exchange redundant test case with small float
* add what's new
* removed useless import
* lint
* Fix whats_new/v0.24.rst
Co-authored-by: Thomas J. Fan <thomasjpfan@gmail.com>
* move whats new section
* disambiguate choice between 1 feature and 100% of features
Co-authored-by: Thomas J. Fan <thomasjpfan@gmail.com>
* move checking for negatives to _fit
* update error to include nones
Co-authored-by: Thomas J. Fan <thomasjpfan@gmail.com>
* markdown style in what's new
Co-authored-by: Thomas J. Fan <thomasjpfan@gmail.com>
* Update sklearn/feature_selection/tests/test_rfe.py
Co-authored-by: Thomas J. Fan <thomasjpfan@gmail.com>
* forgot to delete line
* fix test for negative n_features error
* BUG Fixes issues
* added case for float >1 and more detailed error messages
* lint
* more lint
* more lint
* CLN Minor adjustments
* BLD Force build on ci
Co-authored-by: Roman Yurchak <rth.yurchak@gmail.com>
Co-authored-by: Thomas J. Fan <thomasjpfan@gmail.com>
* discrete_features str and value check
* Update if logic
* Add discrete_features bad str value test
* Remove unnecessary nested isinstance str check
* Add back nested isinstance str check
* New/updates to tests
* Add v0.21 whats new entry
* Undo v0.21 whats new entry