if (FALSE) {
# to see all plots
layout(mat = matrix(c(1,2,3,3), nrow = 2, byrow = TRUE))
plot(x = sivs_object)
layout(1)
# to plot only the Recursive Feature Elimination (rfe) results
plot(x = sivs_object, type = "rfe")
# suppress suggestion on rfe plot
plot(x = sivs_object, type = "rfe", suggestion_strictness = NULL)
}
## WORKING EXAMPLE
## Note that this example does not logically make sense as iris data has only
## 4 columns and there is no need for SIVS to take care of feature selection
## therefore this example is only here for testing purposes.
tmp <- subset(x = iris, subset = Species != "setosa")
tmp <- varhandle::unfactor(tmp)
sivs_obj <- sivs(x = tmp[, c("Sepal.Length", "Sepal.Width",
"Petal.Length", "Petal.Width")],
y = factor(tmp$Species),
family = "binomial",
verbose = "detailed",
progressbar = FALSE,
nfolds = 3,
parallel.cores = FALSE,
iter.count = 20)
plot(sivs_obj, type = "frequency")
plot(sivs_obj, type = "coef")
plot(sivs_obj, type = "rfe")
Run the code above in your browser using DataLab