Description Usage Arguments Details Value See Also Examples
This function creates a table of the sequential relevance of the variables used in the definition of a box defined by define_fixbox
.
1 | var_select(fixbox)
|
fixbox |
object of class " |
This function does a sequential removal off all variables defining one box. In each iteration every variable left in the box definition is tried to be completley left out of the definition. From all variables this one is removed, which causes the least decrease of the target function evaluated on all observations lying in the box.
var_select
returns a list with the following components:
tab |
table showing the sequential relevances of the variables used in the definition of the |
fixboxes |
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | # generating random data:
set.seed(123)
n <- 500
x1 <- runif(n = n, min = -1)
x2 <- runif(n = n, min = -1)
x3 <- runif(n = n, min = -1)
cat <- as.factor(sample(c("a","b","c", "d"), size = n, replace = TRUE))
wsk <- (1-sqrt(x1^2+x2^2)/sqrt(2))
y <- as.logical(rbinom(n = n, prob = wsk, size = 1))
dat <- cbind.data.frame(y, x1, x2, x3, cat)
plot(dat$x1, dat$x2, col=dat$y+1, pch=16)
remove(x1, x2, x3, y, wsk, cat, n)
# apply the PRIM function to find the best box with a support of at least 0.1:
p <- PRIM(y~., data=dat, beta_min = 0.1, max_boxes = 1, print_position = FALSE)
# sequential variable relevances:
var_select(p$fixboxes[[1]])$tab
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.