EXA Adds example for tree.ExtraTreeRegressor
@@ -1631,6 +1631,21 @@ class ExtraTreeRegressor(DecisionTreeRegressor):
.. [1] P. Geurts, D. Ernst., and L. Wehenkel, "Extremely randomized trees",
Machine Learning, 63(1), 3-42, 2006.
+
+ Examples
+ --------
+ >>> from sklearn.datasets import load_boston
+ >>> from sklearn.model_selection import train_test_split
+ >>> from sklearn.ensemble import BaggingRegressor
+ >>> from sklearn.tree import ExtraTreeRegressor
+ >>> X, y = load_boston(return_X_y=True)
+ >>> X_train, X_test, y_train, y_test = train_test_split(
+ ... X, y, random_state=0)
+ >>> extra_tree = ExtraTreeRegressor(random_state=0)
+ >>> reg = BaggingRegressor(extra_tree, random_state=0).fit(
+ ... X_train, y_train)
+ >>> reg.score(X_test, y_test)
+ 0.7823...
"""
def __init__(self,
criterion="mse",
