-
-
Notifications
You must be signed in to change notification settings - Fork 25.8k
DOC Add link to plot_tree_regression.py example #26962
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 link to plot_tree_regression.py example #26962
Conversation
I think |
I've merged the two examples here. WDYT @marenwestermann @glemaitre |
We can see that if the maximum depth of the tree (controlled by the | ||
`max_depth` parameter) is set too high, the decision trees learn too fine | ||
details of the training data and learn from the noise, i.e. they overfit. | ||
======================== | ||
""" |
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 would still write a small intro of what we will see
# `max_depth` parameter) is set too high, the decision trees learn too fine | ||
# details of the training data and learn from the noise, i.e. they overfit. | ||
# | ||
# Necessary Imports |
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.
Let's delay the import in the cell that we use them.
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 looks good. I would not propose any further improvement. I think that we could revisit this example in another PR with this intent.
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.
LGTM. I'm happy with it as is but also happy to have a small intro and move the import statements. I don't have a strong preference here.
Reference Issues/PRs
This pr adds link in DecisionTreeRegressor to example file
tree/plot_tree_regression.py
as mentioned in #26927What does this implement/fix? Explain your changes.
Any other comments?