selFreq {permimp}R Documentation

Predictor Selection Frequency in Random Forests

Description

counts how many times each predictor variable was selected for splitting in a random forest. Only implemented for cforest form the party package.

Usage

 
selFreq(object, whichxnames = NULL)

Arguments

object

an object as returned by cforest.

whichxnames

a character vector containing the predictor variable names that for which the permutation importance should be computed. See section 'Details'.

Details

Function selFreq counts how many times each predictor variable was selected for splitting in a random forest. In the current implementation this selFreq can only be applied to random forests as returned by cforest.

Value

An object of class VarImp, with as $values the mean of the sum of the selection frequencies across the trees.

See Also

VarImp,

Examples

    
  set.seed(290875)
  readingSkills.cf <- party::cforest(score ~ ., data = party::readingSkills, 
                              control = party::cforest_unbiased(mtry = 2, ntree = 100))
  
  ## Selection Frequency
  selFreq(readingSkills.cf)


[Package permimp version 1.0-2 Index]