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

Inconsistent inherited docstrings #124

Open
rth opened this issue Jan 25, 2018 · 1 comment
Open

Inconsistent inherited docstrings #124

rth opened this issue Jan 25, 2018 · 1 comment

Comments

@rth
Copy link
Contributor

rth commented Jan 25, 2018

A few estimators subclass estimators from other ML packages (e.g. scikit-learn) and when a method is not overwritten, the docstring from the parent package is used directly in the documentation, which is not necessarily consistent. For instance,

I wonder if some automatic re-writing of the non-overwritten methods could partially address this...

@TomAugspurger
Copy link
Member

Yes, there's some work to be done here. Thanks for raising it. Short-term, the notes we append / prepend could be better, e.g. QuantileTransformer:

This implementation differs from the scikit-learn implementation by using approximate quantiles. The scikit-learn docstring follows.

Could be expanded to enumerate how it differs (which keywords are ignored, no support for sparse).

For, e.g. QuantileTransformer.inverse_transform we can define the method and write a correct docstring, but just call super() for the implementation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants