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

Improving documentation discoverability for Displays #25980

Closed
glemaitre opened this issue Mar 27, 2023 · 1 comment · Fixed by #25994
Closed

Improving documentation discoverability for Displays #25980

glemaitre opened this issue Mar 27, 2023 · 1 comment · Fixed by #25994

Comments

@glemaitre
Copy link
Member

Looking at the documentation (e.g https://scikit-learn.org/stable/modules/generated/sklearn.metrics.RocCurveDisplay.html) I just realised that the examples reported in the displays are the ones invoking __init__. However, we request to use from_estimator and from_predictions. So we don't show enough examples or even not the ones that we want people to use.

@lesteve You know better than me sphinx-gallery. Do you know how we could solve this issue?
I was thinking that for those specific classes, we could make a new template derived from class.rst where we alter:

.. include:: {{module}}.{{objname}}.examples

to show the examples of the from_estimator and from_predictions methods instead?

@lesteve
Copy link
Member

lesteve commented Mar 27, 2023

Hmmm looks like a sphinx-gallery limitation indeed, no idea off the top of my head how to work-around or fix this ...

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

Successfully merging a pull request may close this issue.

2 participants