* 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>
* removed warn_on_dtype
* removed parameters to check_is_fitted
* all_estimators parameters
* deprecated n_components attribute in AgglomerativeClustering
* change default of base.score for multioutput
* removed lots of useless decorators?
* changed default of copy in quantil_transform
* removed six.py
* nmf default value of init param
* raise error instead of warning in LinearDiscriminantAnalysis
* removed label param in hamming_loss
* updated method parameter of power_transform
* pep8
* changed default value of min_impurity_split
* removed assert_false and assert_true
* added and fixed versionchanged directives
* reset min_impurity_split default to None
* fixed LDA issue
* fixed some test
* more docstrings updates
* set min_impurity_decrease for test to pass
* upate docstring example
* fixed doctest
* removed multiouput.score since it's now consistent with the default
* deprecate least_angle parameter combination
* remove support for l1 or l2 loss in svm
* removed linear_assignment.py
* add test