sklearn.tree.ExtraTreeRegressor
Jump to navigation
Jump to search
A sklearn.tree.ExtraTreeRegressor is a Regresssion Extra-Trees Learning System within sklearn.tree
module.
- AKA: ExtraTreeRegressor, tree.ExtraTreeRegressor.
- Context
- Usage:
- 1) Import Regression Extra-Trees Learning System from scikit-learn :
from sklearn.tree import ExtraTreeRegressor
- 2) Create design matrix
X
and response vectorY
- 3) Create Extra-Trees Regressor object:
ETreg=ExtraTreeRegressor(criterion=’gini’, splitter=’best’[, max_depth=None, min_samples_split=2, min_samples_leaf=1,...])
- 4) Choose method(s):
ETreg
.apply(X[, check_input])
, returns the leaf index for each sample predictor.ETreg
.decision_path(X[, check_input])
, returns the decision path in the tree.ETreg
.fit(X, y[, sample_weight, check_input,...])
builds a decision tree regressor from the training set (X, y).ETreg
.get_params([deep])
returns parameters for this estimator.ETreg
.predict(X[, check_input])
, predicts regression value for X.ETreg
.score(X, y[, sample_weight])
, returns the coefficient of determination R^2 of the prediction.ETreg
.set_params(**params)
, sets the parameters of this estimator.
- 1) Import Regression Extra-Trees Learning System from scikit-learn :
- Example(s):
- …
- Counter-Example(s):
- See: Decision Tree, Classification System, Regularization Task, Ridge Regression Task, Kernel-based Classification Algorithm.
References
2017
- (Scikit-Learn, 2017) ⇒ http://scikit-learn.org/stable/modules/generated/sklearn.tree.ExtraTreeRegressor.html Retrieved:2017-10-22
- QUOTE:
class sklearn.tree.ExtraTreeRegressor(criterion=’mse’, splitter=’random’, max_depth=None, min_samples_split=2, min_samples_leaf=1, min_weight_fraction_leaf=0.0, max_features=’auto’, random_state=None, min_impurity_decrease=0.0, min_impurity_split=None, max_leaf_nodes=None)
An extremely randomized tree regressor.
Extra-trees differ from classic decision trees in the way they are built. When looking for the best split to separate the samples of a node into two groups, random splits are drawn for each of the max_features randomly selected features and the best split among those is chosen. When max_features is set 1, this amounts to building a totally random decision tree.
Warning: Extra-trees should only be used within ensemble methods.
Read more in the User Guide.
- QUOTE: