oobPermutedPredictorImportance
Out-of-bag predictor importance estimates for random forest of classification trees by permutation
Description
returns out-of-bag, predictor
importance estimates by permutation using the random forest of
classification trees imp
= oobPermutedPredictorImportance(Mdl
)Mdl
. Mdl
must be a ClassificationBaggedEnsemble
model object. imp
is
a 1-by-p numeric vector, where p is the number
of predictor variables in the training data (size(Mdl.X,2)
).
imp(
is the predictor
importance of the predictor
j
)Mdl.PredictorNames(
.j
)
specifies additional options using one or more name-value arguments. For example,
you can specify which trees to use in the predictor importance estimation.imp
= oobPermutedPredictorImportance(Mdl
,Name=Value
)
Examples
Input Arguments
More About
Tips
When growing a random forest using fitcensemble
:
Standard CART tends to select split predictors containing many distinct values, e.g., continuous variables, over those containing few distinct values, e.g., categorical variables [3]. If the predictor data set is heterogeneous, or if there are predictors that have relatively fewer distinct values than other variables, then consider specifying the curvature or interaction test.
Trees grown using standard CART are not sensitive to predictor variable interactions. Also, such trees are less likely to identify important variables in the presence of many irrelevant predictors than the application of the interaction test. Therefore, to account for predictor interactions and identify importance variables in the presence of many irrelevant variables, specify the interaction test [2].
If the training data includes many predictors and you want to analyze predictor importance, then specify
NumVariablesToSample
of thetemplateTree
function as"all"
for the tree learners of the ensemble. Otherwise, the software might not select some predictors, underestimating their importance.
For more details, see templateTree
and Choose Split Predictor Selection Technique.
References
[1] Breiman, L., J. Friedman, R. Olshen, and C. Stone. Classification and Regression Trees. Boca Raton, FL: CRC Press, 1984.
[2] Loh, W.Y. “Regression Trees with Unbiased Variable Selection and Interaction Detection.” Statistica Sinica, Vol. 12, 2002, pp. 361–386.
[3] Loh, W.Y., and Y.S. Shih. “Split Selection Methods for Classification Trees.” Statistica Sinica, Vol. 7, 1997, pp. 815–840.
Extended Capabilities
Version History
Introduced in R2016b