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
DOC add examples to two docstrings for calibration #28742
base: main
Are you sure you want to change the base?
Conversation
Thanks for working on this! This looks good, I'd just move where it is in the docstrings. Lets see what happens to the CI run after you make those changes. I guess these aren't real failures so hopefully they will go away on the next re-run. Otherwise we need to investigate a bit. |
187c628
to
bc6d5b0
Compare
I've moved the links to the examples as per the example you provided, many thanks. |
I am not sure I understand why the docs build fails. The error is this:
Which I think means that too much of the doc string is selected by matplotlib as code. However, when I build the docs locally this doesn't happen. @ogrisel do you have an idea where to start looking maybe? |
sklearn/calibration.py
Outdated
@@ -1391,6 +1396,9 @@ def from_predictions( | |||
>>> y_prob = clf.predict_proba(X_test)[:, 1] | |||
>>> disp = CalibrationDisplay.from_predictions(y_test, y_prob) | |||
>>> plt.show() | |||
|
|||
For another example of usage, see: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the bit that is causing the error.
The plot_directive.py of that version of matplotlib probably has a bug and it might be necessary to debug or search for similar issues in the matplotlib issue tracker. |
Reference Issues/PRs
Contributes towards issue #26927
What does this implement/fix? Explain your changes.
Examples of calibration added to docstrings in sklearn/calibration.py
Any other comments?