View source: R/GetInteractionStrength.R
GetInteractionStrength | R Documentation |
Computes the strength of second order interactions for covariates in a conditional random forest.
GetInteractionStrength(object, xnames=NULL)
object |
An object as returned by |
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. |
A data frame with pairs of variable names and the strength of the interaction between them.
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.
Nicolas Robette
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).
GetPartialData
,GetAleData
## 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.