GetInteractionStrength: Strength of interactions

View source: R/GetInteractionStrength.R

GetInteractionStrengthR Documentation

Strength of interactions

Description

Computes the strength of second order interactions for covariates in a conditional random forest.

Usage

GetInteractionStrength(object, xnames=NULL)

Arguments

object

An object as returned by cforest (or fastcforest).

xnames

character vector. The names of the variables for which to measure the strength of second order interactions. If NULL (default), all covariates are included.

Value

A data frame with pairs of variable names and the strength of the interaction between them.

Note

This function calls vint function from an old version of vip package for each interaction. The results are then gathered and reshaped into a friendly data frame format.

Author(s)

Nicolas Robette

References

Greenwell, B. M., Boehmke, B. C., and McCarthy, A. J.: A Simple and Effective Model-Based Variable Importance Measure. arXiv preprint arXiv:1805.04755 (2018).

See Also

GetPartialData,GetAleData

Examples

  ## Not run: 
  data(iris)
  iris2 = iris
  iris2$Species = factor(iris$Species == "versicolor")
  iris.cf = party::cforest(Species ~ ., data = iris2, 
              controls = party::cforest_unbiased(mtry=2, ntree=50))
  GetInteractionStrength(iris.cf)
  
## End(Not run)

moreparty documentation built on Nov. 22, 2023, 5:08 p.m.