main content

estimates of predictor importance for classification ensemble of decision trees -凯发k8网页登录

estimates of predictor importance for classification ensemble of decision trees

syntax

imp = predictorimportance(ens)
[imp,ma] = predictorimportance(ens)

description

imp = predictorimportance(ens) computes estimates of predictor importance for ens by summing these estimates over all weak learners in the ensemble. imp has one element for each input predictor in the data used to train this ensemble. a high value indicates that this predictor is important for ens.

[imp,ma] = predictorimportance(ens) returns a p-by-p matrix with predictive measures of association for p predictors, when the learners in ens contain surrogate splits. see more about.

input arguments

ens

a classification ensemble of decision trees, created by fitcensemble, or by the method.

output arguments

imp

a row vector with the same number of elements as the number of predictors (columns) in ens.x. the entries are the estimates of predictor importance, with 0 representing the smallest possible importance.

ma

a p-by-p matrix of predictive measures of association for p predictors. element ma(i,j) is the predictive measure of association averaged over surrogate splits on predictor j for which predictor i is the optimal split predictor. predictorimportance averages this predictive measure of association over all trees in the ensemble.

examples

estimate the predictor importance for all variables in the fisher iris data.

load fisher's iris data set.

load fisheriris

train a classification ensemble using adaboostm2. specify tree stumps as the weak learners.

t = templatetree('maxnumsplits',1);
ens = fitcensemble(meas,species,'method','adaboostm2','learners',t);

estimate the predictor importance for all predictor variables.

imp = predictorimportance(ens)
imp = 1×4
    0.0004    0.0016    0.1266    0.0324

the first two predictors are not very important in the ensemble.

estimate the predictor importance for all variables in the fisher iris data for an ensemble where the trees contain surrogate splits.

load fisher's iris data set.

load fisheriris

grow an ensemble of 100 classification trees using adaboostm2. specify tree stumps as the weak learners, and also identify surrogate splits.

t = templatetree('maxnumsplits',1,'surrogate','on');
ens = fitcensemble(meas,species,'method','adaboostm2','learners',t);

estimate the predictor importance and predictive measures of association for all predictor variables.

[imp,ma] = predictorimportance(ens)
imp = 1×4
    0.0674    0.0417    0.1582    0.1537
ma = 4×4
    1.0000         0         0         0
    0.0115    1.0000    0.0022    0.0054
    0.3186    0.2137    1.0000    0.6391
    0.0392    0.0073    0.1137    1.0000

the first two predictors show much more importance than the analysis in estimate predictor importance.

more about

algorithms

element ma(i,j) is the predictive measure of association averaged over surrogate splits on predictor j for which predictor i is the optimal split predictor. this average is computed by summing positive values of the predictive measure of association over optimal splits on predictor i and surrogate splits on predictor j and dividing by the total number of optimal splits on predictor i, including splits for which the predictive measure of association between predictors i and j is negative.

extended capabilities

网站地图