selFreq: Predictor Selection Frequency in Random Forests

Description Usage Arguments Details Value See Also Examples

View source: R/selFreq.R

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

1
2
 
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

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

permimp documentation built on Sept. 14, 2021, 1:07 a.m.