-
-
Notifications
You must be signed in to change notification settings - Fork 26k
Adds example for tree.ExtraTreeRegressor #15213
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
Adds example for tree.ExtraTreeRegressor #15213
Conversation
Thank you for the PR @th0rwas . I am unsure of having an example, when the |
Thanks, that sounds pretty reasonable. I'll revise the example and will use it within an ensemble context then. |
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, thanks @th0rwas
sklearn/tree/tree.py
Outdated
>>> X, y = load_boston(return_X_y=True) | ||
>>> extra_tree = ExtraTreeRegressor() # doctest: +ELLIPSIS | ||
>>> reg = BaggingRegressor(extra_tree, n_estimators=10, random_state=0) | ||
>>> cross_val_score(reg, X, y, cv=5) |
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.
Using cross_val_score
for a example in the docstring seems a little too computational intensive. I'll be okay with fit
on a train set and score on a test set.
You have merge conflicts @th0rwas , do you need help fixing them? |
Co-Authored-By: Thomas J Fan <thomasjpfan@gmail.com>
single evaluation score instead of cross_val_score
@adrinjalali Yes thank you, that would be great. I tried implementing the proposed changes - getting rid of |
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.
Will merge when green
Toward #3846
this PR adds an example to
tree.ExtraTreeRegressor