Commit Graph

81 Commits

Author SHA1 Message Date
Julien Jerphanion 38d568026d
DOC make a doctest more stable in MultiOutputClassifier (#22307)
Co-authored-by: Olivier Grisel <olivier.grisel@ensta.org>
2022-01-26 19:19:43 +01:00
LucieClair ec48b24678
DOC Improve document MultiOutputRegressor (#21836) 2021-11-30 19:40:53 +01:00
Reshama Shaikh 907c093977
DOC Ensures MultiOutput* and RegressorChain passes numpydoc validation (#20713)
Co-authored-by: Guillaume Lemaitre <g.lemaitre58@gmail.com>
2021-09-01 15:02:47 +02:00
baam 54810438a2
DOC Ensures that ClassifierChain passes numpydoc validation (#20835)
Co-authored-by: Guillaume Lemaitre <g.lemaitre58@gmail.com>
2021-08-31 19:01:43 +02:00
Olivier Grisel 270ac2e135
Check features_names_in_ in sklearn.multioutput (#20847) 2021-08-26 16:50:21 +02:00
Harutaka Kawamura 8cf87a30bb
MNT Replace `@property` on predict methods with `@available_if` (#20667)
Co-authored-by: Guillaume Lemaitre <g.lemaitre58@gmail.com>
2021-08-13 18:00:21 -04:00
Olivier Grisel 1bd007fe0d Apply black on main 2021-07-12 19:37:28 +02:00
Joel Nothman ed3642014b
ENH Add available_if as a generic, literate variant of if_delegate_has_method (#19948)
* 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
2021-07-11 15:36:26 +02:00
Thomas J. Fan 3ae7c76153
STY Enables black with experimental_string_processing=true (#20412) 2021-06-29 09:47:04 +02:00
Thomas J. Fan 82df48934e
MNT Applies black formatting to most of the code base (#18948) 2021-06-17 14:21:09 -04:00
LSturtew 3f69c7da4d
ENH Adds n_features_in_ checking to multioutput (#19692)
Co-authored-by: jeremie du boisberranger <jeremiedbb@yahoo.fr>
2021-06-15 18:40:57 +02:00
Tom Dupré la Tour f6e6ad2d9e
MNT clean futurewarning for 1.0 | _deprecate_positional_args (#20002)
Co-authored-by: Olivier Grisel <olivier.grisel@ensta.org>
Co-authored-by: Thomas J. Fan <thomasjpfan@gmail.com>
2021-05-14 11:30:27 -04:00
Guillaume Lemaitre e56d76a8da
FIX Removes unecessary check in _BaseChain (#19865) 2021-04-12 11:03:02 -04:00
Thomas J. Fan da3c2d2a19
FIX MultiOutputRegressor correctly ducktypes fitted estimators (#19308)
Co-authored-by: Olivier Grisel <olivier.grisel@gmail.com>
2021-04-09 18:34:13 +02:00
tnwei 38a50f4c7b
DOC Improve n_jobs docs in sklearn/multioutput.py (#18634) 2020-10-30 14:35:59 -04:00
Albert Villanova del Moral f7a8dd2877
DOC Fix version in whatsnew and docstring (#18504)
* Fix feature version in whatsnew

* Add versionaddded

* Add versionadded to whatsnew enhancement

* fix versionchanged format
2020-10-01 13:02:54 +02:00
Thomas J. Fan 06d6f8a9f6
FIX Passes global configuration when spawning joblib jobs (#17634)
* WIP

* BUG Passes context to joblib jobs

* BUG Fix

* BUG Fix

* CLN Moves delayed into fixes

* CLN Adds linter

* REV Revert diff

* DOC Adds comment for removal

* Use a simple implementation
2020-09-21 16:59:42 +02:00
Albert Villanova del Moral 647fcb1ac1
DOC Fix A to uppercase in See Also docstring section (#18332) 2020-09-04 10:35:01 -04:00
Venkatachalam N 8ba49f6280
EHN make some meta-estimators lenient towards missing values (#17987)
Co-authored-by: Guillaume Lemaitre <g.lemaitre58@gmail.com>
2020-08-26 11:10:24 +02:00
amy12xx f656c37d19
FIX Fixes ClassifierChain issue when a tuple is passed to order (#18124)
* 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>
2020-08-17 14:30:15 -04:00
Frans Larsson 895f20d233
DOC Fix default values in multioutput.py docstrings (#17841)
Co-authored-by: Juan Carlos Alfaro Jiménez <JuanCarlos.Alfaro@uclm.es>
Co-authored-by: Guillaume Lemaitre <g.lemaitre58@gmail.com>
2020-07-10 10:32:27 +02:00
Juan Carlos Alfaro Jiménez 9cd13a1fa1
FIX Change MRO for some estimators (#17837) 2020-07-05 13:52:42 +02:00
Thorben Jensen d62af0e55d
DOC add minimal example to multioutput.ClassifierChain (#15211)
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>
2020-06-18 00:30:08 +02:00
Maren Westermann 5a8562703e
DOC adding suggested spaces in multioutput/RegressorChain (#17498)
* example for multioutput regressor

* add spaces (suggested changes) #DataUmbrella

Co-authored-by: Tim Nonner <tim.nonner@tamedia.ch>
2020-06-06 17:47:13 -04:00
Nicolas Hug ac8cbb3799
[MRG] More deprecation for 0.24 (#17142)
* 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
2020-05-20 16:04:14 -04:00
brigi dbc35934a6
DOC Version added and changed labels added for v0.18 (#wimlds) (#16222)
* Versionlabels added to v0.18 (#wimlds)

* documentation issues: label changed and added for version 0.18

* fix intends and shorten description

Co-authored-by: Hannah <32333241+hhnnhh@users.noreply.github.com>
Co-authored-by: Brigitte@home <unger@nue.tu-berlin.de>
2020-04-27 18:43:47 -04:00
Ekaterina Borovikova 4755ae76d2
DOC Add versionchanged and versionadded for v0.20 (#16199)
Co-Authored-By: Adrin Jalali <adrin.jalali@gmail.com>
Co-Authored-By: Chiara Marmo <cmarmo@users.noreply.github.com>
Co-Authored-By: Nicolas Hug <contact@nicolas-hug.com>
2020-04-26 09:29:36 -04:00
Adrin Jalali 02309ffbda
API kwonly args in manifold, metrics, mixture, model_selection, multclass, multioutput (#16982) 2020-04-24 17:24:24 -04:00
Noa Tamir 5e2d74bc5f
DOC add versionadded versionchanged v0.19 (#16233)
* 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>
2020-04-15 10:36:51 +02:00
Katrina Ni c4cf5fc340
DOC add example to MultiOutputRegressor (#16698)
Co-authored-by: Benjamin Bossan <BenjaminBossan@users.noreply.github.com>
Co-authored-by: Sönke Behrends <s.behrends@math.uni-goettingen.de>
Co-authored-by: Katrina Ni <kani@tableau.com>
2020-03-18 21:58:14 +11:00
Nicolas Hug d205638475
MNT Introduction of n_features_in_ attr with _validate_data mtd (#16112) 2020-02-29 09:05:11 -05:00
Venkatachalam N feb80ea973
ENH adding fit_params option for RegressorChain (#16111) 2020-02-18 19:02:38 -05:00
judithabk6 05476a1d38
TST Add test for documentation of the classes_ attribute (#16277)
Co-authored-by: Alexandre Gramfort <alexandre.gramfort@m4x.org>
2020-01-31 14:12:43 +01:00
Pierre Delanoue 034c021fb2
Fix Typo in random_state for multioutput.py (#16309) 2020-01-30 14:48:22 +01:00
Pierre Delanoue 98f0eb8137
DOC improve random state docstring in ClassifierChain and RegressorChain (#16291) 2020-01-30 10:16:48 +01:00
Nicolas Hug 4953ec36a4 MNT remove more deprecations for 0.23 (#15860)
* 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
2020-01-13 13:43:50 +01:00
huangk10 bdf1ae9e4a ENH Add a optional fit_param to enable custom MultiOutput fit process (#15959) 2020-01-06 17:40:16 -05:00
Rebekah Kim 981fa7b8f1 FIX property for predict_proba in MultiOutput Classifier (#15490) 2019-11-08 09:36:58 +11:00
Nicolas Hug 12c2b40761
MNT Remaining deprecations in sklearn/file.py (#15399) 2019-11-04 14:22:42 -05:00
Natasha Borders 3ca653af12 DOC adding versionadded labels to several estimators (#15476) 2019-11-04 18:25:24 +11:00
Robert Juergens cdd3d91792 DOC Added example for sklearn.multioutput.MultiOutputClassif… (#15191) 2019-10-16 14:46:19 -04:00
mschaffenroth 847b3468c7 MNT Remove utils.fixes.parallel_helper (#15232) 2019-10-14 07:45:10 -04:00
Adrin Jalali 0eebade264 DOC docstring (shape= -> of shape) (#14640) 2019-10-02 20:54:32 -04:00
Thomas J Fan 14f5302b70 DOC Link items explictly (#14817)
* DOC Link items explictly

* STY

* DOC Link another
2019-09-05 11:37:05 +02:00
Andreas Mueller 03ea20db0f Fix mixin inheritance order, allow overwriting tags (#14884) 2019-09-05 10:13:30 +02:00
Agamemnon Krasoulis 06dc44c965 TST MultiOutputClassifier classes_ attribute (#14629) 2019-08-14 11:32:52 +02:00
Andreas Mueller 92af3dabbb MAINT simplify check_is_fitted to use any fitted attributes (#14545) 2019-08-13 22:09:07 +02:00
Roman Yurchak 1015caf54d MAINT Remove imports from sklearn.utils._joblib (#13676)
* Remove sklearn.utils._joblib imports

* Lint

* More fixes
2019-06-18 18:37:14 +04:00
Rebekah Kim d903436afe Fix MultiOutputClassifier checking for predict_proba method of base estimator (#12222)
#WiMLDS
2019-04-19 14:16:49 -04:00
Hanmin Qin 73e2ecf7ce
API Change default multioutput in RegressorMixin.score to keep consistent with metrics.r2_score (#13157) 2019-03-15 17:47:50 +08:00