scikit-learn/sklearn/feature_selection/tests
Meekail Zain db24a30bd3
ENH Allow `SelectFromModel`'s `max_features` to accept callables (#22356)
* 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>
2022-03-22 11:18:12 +01:00
..
__init__.py Move project directory from scikits.learn to sklearn 2011-09-02 12:06:57 +02:00
test_base.py MNT Applies black formatting to most of the code base (#18948) 2021-06-17 14:21:09 -04:00
test_chi2.py MNT Applies black formatting to most of the code base (#18948) 2021-06-17 14:21:09 -04:00
test_feature_select.py ENH preserves dtypes for GenericUnivariateSelect class (#22370) 2022-02-14 18:24:29 +01:00
test_from_model.py ENH Allow `SelectFromModel`'s `max_features` to accept callables (#22356) 2022-03-22 11:18:12 +01:00
test_mutual_info.py TST Add minimal setup to be able to run test suite on float32 (#22690) 2022-03-17 14:25:17 +01:00
test_rfe.py API Replacing grid_scores_ by cv_results_ in _rfe.py and test_rfe.py (#20161) 2021-07-30 18:01:49 +02:00
test_sequential.py ENH Adds n_features_to_select upper limit to SeqFeatureSelector (#20145) 2021-12-24 09:13:16 -05:00
test_variance_threshold.py MNT Applies black formatting to most of the code base (#18948) 2021-06-17 14:21:09 -04:00