Co-authored-by: Christian Lorentzen <lorentzen.ch@gmail.com>
Co-authored-by: Olivier Grisel <olivier.grisel@ensta.org>
Co-authored-by: Benjamin Bossan <BenjaminBossan@users.noreply.github.com>
Co-authored-by: Thomas J. Fan <thomasjpfan@gmail.com>
Co-authored-by: Omar Salman <omar.salman@arbisoft.com>
* Better documentation where if_delegate_has_method is inapplicable
Fixes#19923
Introduces an elegant alternative for if_delegate_has_method, a decorator called available_if, which uses a callable to determine if an object should show a particular attribute.
If the callable also accepted the attribute name being decorated as a parameter, this could be used to implement if_delegate_has_method.
We could also replace if_delegate_has_method in all cases, since the code might be more readable as @available_if(lambda self, method: hasattr(self.base_estimator, method))
Possible alternative naming of available_if: hasattr_if.
TODO: add tests of the new decorator
* Fix use of super()
* Fixes to silly errors...
* add noqa
* Fix docstring issues
* remove debugging statements
* Use available_if instead of if_delegate_has_method in multioutput
* Public to private
* Rm unused import
* Black
* Use a sentinel instead of for-else with early return
* update reference docs
* TST
* DOC Add change log
* Update doc/whats_new/v1.0.rst
* Make test make sense
* Black
* Define available_if function in class
* Another way to express multioutput delegations
* fix error tuple passed to order
* fix linting
* Update sklearn/tests/test_multioutput.py
Co-authored-by: Roman Yurchak <rth.yurchak@gmail.com>
* updated test and whatsnew
* doc fix
* Update doc/whats_new/v0.24.rst
Co-authored-by: Roman Yurchak <rth.yurchak@gmail.com>
* Update sklearn/tests/test_multioutput.py
Co-authored-by: Thomas J. Fan <thomasjpfan@gmail.com>
* Update sklearn/tests/test_multioutput.py
Co-authored-by: Thomas J. Fan <thomasjpfan@gmail.com>
* code review fix
* code review fix
* added test
* code review fix
* Update sklearn/multioutput.py
Co-authored-by: Joel Nothman <joel.nothman@gmail.com>
Co-authored-by: Roman Yurchak <rth.yurchak@gmail.com>
Co-authored-by: Thomas J. Fan <thomasjpfan@gmail.com>
Co-authored-by: Joel Nothman <joel.nothman@gmail.com>
Co-Authored-By: Benjamin Bossan <BenjaminBossan@users.noreply.github.com>
Co-authored-by: Adrin Jalali <adrin.jalali@gmail.com>
Co-authored-by: Thomas J Fan <thomasjpfan@gmail.com>
* normalize_components in sparsePCA
* changed default strategy of Dummy to prior and removed outputs_2d ttribute
* removed usage of None to drop estimator in ensemble and behaviour param of IsolationForest
* remove support for drop=None in Voting
* removed some warning decorators
* remove feature_extraction.extract_patches
* removed VectorizerMixin and copy parameter from TFIDFVectorizer
* kernel.set_params now raises attributeerror
* removed fig from plot_partial_dependence
* removed iid parameter of search estimators
* removed brier_scorer
* raise error in split when shuffle is False and random_state is not None
* removed MultiOutputEstimator
* removed base classes of NaiveBayes
* removed drop from pipeline
* removed utils in random_projection
* removed presort and classes_ in trees
* flake8
* fixed some tests
* flake
* fixed docstring
* fixed other one
* some left
* mmmm
* added v0.19.1 and wip v0.19
* finished adding vchanged strings for v0.19
Towards #15426
@adrinjalali #wimlds #scikitlearnsprint
* fixing linter issues
* caught line issues with flake8
* caught the last line issue
* added lines and cleaned gtiignore
* Update sklearn/multiclass.py
Co-Authored-By: Thomas J Fan <thomasjpfan@gmail.com>
* Update sklearn/multiclass.py
Co-Authored-By: Thomas J Fan <thomasjpfan@gmail.com>
Co-authored-by: Thomas J Fan <thomasjpfan@gmail.com>