简体   繁体   中英

matlab: treebagger using option 'ComputeOOBVarImp'

I'm trying to evaluate the importance of features using function Treebagger in Matlab.

Treebagger help file shows:

COMPUTEOOBVARIMP Flag to compute out-of-bag variable importance.
    The ComputeOOBVarImp property is a logical flag specifying whether out-of-bag
    estimates of variable importance should be computed.  The default is
    false. If this flag is true, COMPUTEOOBPREDICTION is true as well.


If this flag is true, the following properties are available:
   OOBPermutedVarDeltaError, OOBPermutedVarDeltaMeanMargin,
   OOBPermutedVarCountRaiseMargin

But the output I get is:

b = treeBagger(20,resultMatrix,runOutputs,'OOBVarImp','on','Method','classification','NVarToSample',10);

> Ensemble with 20 bagged decision trees:

           Training X:           [4130x308]

           Training Y:             [4130x1]

               Method:       classification

                Nvars:                  308

         NVarToSample:                   10

              MinLeaf:                    1

                FBoot:                    1

SampleWithReplacement:                    1

 ComputeOOBPrediction:                    1

     ComputeOOBVarImp:                    1

            Proximity:                   []

           ClassNames:             '0'             '1'

To my understanding, ComputeOOBVarImp is set to be true, but the properties OOBPermutedVarDeltaError, OOBPermutedVarDeltaMeanMargin, and OOBPermutedVarCountRaiseMargin are not here.

Could anyone help me with this problem? Thank you very much.

试试 b.OOBPermutedVarDeltaError

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM