Implements formula interface for wff
.
# S3 method for formula
wff(formula, data = NULL, ...)
Formula object.
data used in the analysis.
Additional arguments
An object of type fuzzy_forest
. This
object is a list containing useful output of fuzzy forests.
In particular it contains a data.frame with list of selected features.
It also includes the random forest fit using the selected features.
# NOT RUN {
data(ctg)
y <- ctg$NSP
X <- ctg[, 2:22]
dat <- as.data.frame(cbind(y, X))
WGCNA_params <- WGCNA_control(p = 6, minModuleSize = 1, nThreads = 1)
mtry_factor <- 1; min_ntree <- 500; drop_fraction <- .5; ntree_factor <- 1
screen_params <- screen_control(drop_fraction = drop_fraction,
keep_fraction = .25, min_ntree = min_ntree,
ntree_factor = ntree_factor,
mtry_factor = mtry_factor)
select_params <- select_control(drop_fraction = drop_fraction,
number_selected = 5,
min_ntree = min_ntree,
ntree_factor = ntree_factor,
mtry_factor = mtry_factor)
# }
# NOT RUN {
library(WGCNA)
wff_fit <- wff(y ~ ., data=dat,
WGCNA_params = WGCNA_params,
screen_params = screen_params,
select_params = select_params,
final_ntree = 500)
#extract variable importance rankings
vims <- wff_fit$feature_list
#plot results
modplot(wff_fit)
# }
Run the code above in your browser using DataLab