主要内容

predictorImportance

Estimates of predictor importance for regression ensemble

Syntax

imp =预测象征(ENS)
[imp,ma] = predictorImportance(ens)

描述

小鬼= predictorimportance(ens)计算预测因子重要性的估计值ensby summing these estimates over all weak learners in the ensemble.小鬼has one element for each input predictor in the data used to train this ensemble. A high value indicates that this predictor is important forens

[小鬼,] =预测象征(ens)返回一个P-经过-P矩阵具有相关性的预测度量P预测指标。

Input Arguments

ens

一种regression ensemble, created byfitrensemble, or by the袖珍的方法。

Output Arguments

小鬼

具有与预测变量数(列)相同的元素数量的行矢量ens。X。The entries are the estimates of predictor importance, with0表示最小的重要性。

一种P-经过-P预测性衡量标准的矩阵P预测指标。元素马(i,j)is the predictive measure of association averaged over surrogate splits on predictorJ对于哪个预测指标I是最佳的拆分预测变量。predictorImportance平均合奏中所有树木的关联的预测度量。

例子

expand all

Estimate the predictor importance for all predictor variables in the data.

加载汽车舞data set.

load汽车舞

种植100棵回归树的合奏MPGusing加速度,Cylinders,Displacement,马力,model_year, 和Weight作为预测指标。Specify tree stumps as the weak learners.

x = [加速圆柱体位移马力型模型_year重量];t = Templatetree('maxnumsplits',1);ens = fitrensemble(x,mpg,'Method','LSBoost',“学习者”,t);

估计所有预测变量的预测重要性。

imp =预测象征(ENS)
小鬼=1×60.0150 0 0.0066 0.1111 0.0437 0.5181

Weight, the last predictor, has the most impact on mileage. The second predictor has importance 0, which means that the number of cylinders has no impact on predictions made withens

估计数据中所有变量的预测重要性以及回归树合奏包含替代拆分的位置。

加载汽车舞data set.

load汽车舞

种植100棵回归树的合奏MPGusing加速度,Cylinders,Displacement,马力,model_year, 和Weight作为预测指标。将树树桩指定为弱学习者,并确定替代分裂。

x = [加速圆柱体位移马力型模型_year重量];t = Templatetree('maxnumsplits',1,'Surrogate','on');ens = fitrensemble(x,mpg,'Method','LSBoost',“学习者”,t);

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

[imp,ma] = predictorImportance(ens)
小鬼=1×60.2141 0.3798 0.4369 0.6498 0.3728 0.5700
嘛=6×61.0000 0.0098 0.0102 0.0098 0.0033 0.0067 0 1.0000 0 0 0 0 0.0056 0.0084 1.0000 0.0078 0.0022 0.0084 0.3537 0.4769 0.5834 1.0000 0.1612 0.5827 0.0061 0.0070 0.0063 0.0064 1.0000 0.0056 0.0154 0.0296 0.0533 0.0447 0.0070 1.0000

比较小鬼to the results inEstimate Predictor Importance,马力has the greatest impact on mileage, withWeight具有第二大影响。

More About

expand all

算法

元素马(i,j)is the predictive measure of association averaged over surrogate splits on predictorj对于哪个预测指标i是最佳的拆分预测变量。This average is computed by summing positive values of the predictive measure of association over optimal splits on predictori并在预测器上替代拆分j并除以预测变量的最佳拆分总数i, including splits for which the predictive measure of association between predictorsijis negative.

Extended Capabilities