-
-
Notifications
You must be signed in to change notification settings - Fork 26.5k
DOC use notebook-style for plot_rbm_logistic_classification.py #23104
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 use notebook-style for plot_rbm_logistic_classification.py #23104
Conversation
jsilke
left a comment
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.
Thank you for the PR! Overall it looks good, but I do have a couple of comments. Please let me know what you think.
| from sklearn.neural_network import BernoulliRBM | ||
| from sklearn.pipeline import Pipeline | ||
| from sklearn.preprocessing import minmax_scale | ||
| from sklearn.base import clone |
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.
Perhaps we could move the imports to the cells in which they are first used.
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.
Very good point, thank you!
| % (metrics.classification_report(Y_test, Y_pred)) | ||
| ) |
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.
It might be nice to split this cell so that we don't need to scroll through the output to look at both classification reports.
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.
Thank you for your comments! Should I make these changes as a new PR?
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.
|
For some weird reasons, CircleCI did not run on the example, I updated your branch to rerun the CI and be able to see the generated doc for the example. |
…t-learn#23104) Co-authored-by: Ingela <[email protected]> Co-authored-by: Loïc Estève <[email protected]>
Reference Issues/PRs
Issue #22406 fixed file examples/neural_networks/plot_rbm_logistic_classification.py
What does this implement/fix? Explain your changes.
The text in the file was difficult to read because it was not in notebook-style. I replaced long lines of "###" with "# %%" syntax so now it's more readable.
Any other comments?