if (FALSE) {
## Load package:
library("diversityForest")
## Set seed to make results reproducible:
set.seed(1234)
## Construct interaction forest and calculate EIM values:
data(stock)
model <- interactionfor(dependent.variable.name = "company10", data = stock,
num.trees = 20)
# NOTE: num.trees = 20 (in the above) would be much too small for practical
# purposes. This small number of trees was simply used to keep the
# runtime of the example short.
# The default number of trees is num.trees = 20000 if EIM values are calculated
# and num.trees = 2000 otherwise.
## When using the plot() function without further specifications,
## by default the estimated bivariable influences of the two pairs with largest quantitative
## and qualitative EIM values are shown:
plot(model)
# It is, however, also possible to change the numbers of
# pairs with largest quantitative and qualitative EIM values
# to be shown:
plot(model, numpairsquant = 4, numpairsqual = 3)
}
Run the code above in your browser using DataLab