The Wayback Machine - https://web.archive.org/web/20200822001302/https://github.com/scikit-learn/scikit-learn/issues/18150
Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve fit_transform docstring in VotingClassifier and VotingRegressor #18150

Open
glemaitre opened this issue Aug 13, 2020 · 5 comments
Open

Improve fit_transform docstring in VotingClassifier and VotingRegressor #18150

glemaitre opened this issue Aug 13, 2020 · 5 comments

Comments

@glemaitre
Copy link
Contributor

@glemaitre glemaitre commented Aug 13, 2020

The fit_transform docstrings of the VotingClassifier and VotingRegressor are inherited from the TransformerMixin:

Fit to data, then transform it.

Fits transformer to X and y with optional parameters fit_params and returns a transformed version of X.

They don't really apply here and we should use the docstring from transform to explain what is returned:

Return class labels or probabilities for X for each estimator.
Return predictions for X for each estimator.
@glemaitre glemaitre changed the title Improve fit_transform docstring in VotingEstimator Improve fit_transform docstring in VotingClassifier and VotingRegressor Aug 13, 2020
@Yogendra0Sharma
Copy link

@Yogendra0Sharma Yogendra0Sharma commented Aug 14, 2020

@glemaitre please assign it to me.

@glemaitre
Copy link
Contributor Author

@glemaitre glemaitre commented Aug 14, 2020

@Yogendra0Sharma
Copy link

@Yogendra0Sharma Yogendra0Sharma commented Aug 14, 2020

take

@chaitanyamogal
Copy link
Contributor

@chaitanyamogal chaitanyamogal commented Aug 16, 2020

is it possible to directly assign:
VotingClassifier.fit_transform.doc = "Return class labels or probabilities for X for each estimator."
@glemaitre

@NicolasHug
Copy link
Member

@NicolasHug NicolasHug commented Aug 17, 2020

@chaitanyamogal it would technically work but we prefer to override the whole method. Note however that @Yogendra0Sharma has already claimed the issue

@NicolasHug NicolasHug removed the help wanted label Aug 17, 2020
chaitanyamogal added a commit to chaitanyamogal/scikit-learn that referenced this issue Aug 18, 2020
updated docstring of fit_transfrom method by overriding the whole method which was inherited from the TransformerMixin
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants
You can’t perform that action at this time.