-
-
Notifications
You must be signed in to change notification settings - Fork 25.8k
DOC Update notebook style for plot_bayesian_ridge_curvefit #22916
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
Conversation
@@ -28,33 +28,36 @@ | |||
|
|||
# Author: Yoshihiro Uchida <nimbus1after2a1sun7shower@gmail.com> | |||
|
|||
# %% | |||
# Generate sinusoidal data with noise | |||
# ----------------------------------- | |||
import numpy as np | |||
import matplotlib.pyplot as plt |
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.
I suggest moving this import down to the plotting code block where it is 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.
Done.
from sklearn.linear_model import BayesianRidge | ||
|
||
reg = BayesianRidge(tol=1e-6, fit_intercept=False, compute_score=True) |
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.
Based on your PR comment, I suspect you meant to move these lines into the previous fitting block rather than this plotting one. I agree that the fitting block would be a better place for these lines given that this final block is only concerned with plotting.
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.
Done.
Thanks for taking the time to review!
LGTM, merging, thanks a lot! |
And thanks @jsilke for the helpful comments! |
…arn#22916) Co-authored-by: Juan Gomez <jgomez75@gatech.edu>
DOC Update notebook style for plot_bayesian_ridge_curvefit
Reference Issues/PRs
Update examples/linear_model/plot_bayesian_ridge_curvefit.py to notebook style, Issue #22406
What does this implement/fix? Explain your changes.
Split into 3 sections
Moved the following code