Learn R Programming

moreparty (version 0.4)

GetInteractionStrength: Strength of interactions

Description

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

Usage

GetInteractionStrength(object, xnames=NULL)

Value

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

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.

Author

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

Run this code
  if (FALSE) {
  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)
  }

Run the code above in your browser using DataLab