dask / dask-ml

Scalable Machine Learning with Dask
http://ml.dask.org
BSD 3-Clause "New" or "Revised" License
902 stars 256 forks source link

Inconsistent inherited docstrings #124

Open rth opened 6 years ago

rth commented 6 years ago

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 commented 6 years ago

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.