# NOT RUN {
# }
# NOT RUN {
data(BloodBrain)
## Use a GAM is the filter, then fit a random forest model
RFwithGAM <- sbf(bbbDescr, logBBB,
sbfControl = sbfControl(functions = rfSBF,
verbose = FALSE,
method = "cv"))
RFwithGAM
predict(RFwithGAM, bbbDescr[1:10,])
## classification example with parallel processing
## library(doMC)
## Note: if the underlying model also uses foreach, the
## number of cores specified above will double (along with
## the memory requirements)
## registerDoMC(cores = 2)
data(mdrr)
mdrrDescr <- mdrrDescr[,-nearZeroVar(mdrrDescr)]
mdrrDescr <- mdrrDescr[, -findCorrelation(cor(mdrrDescr), .8)]
set.seed(1)
filteredNB <- sbf(mdrrDescr, mdrrClass,
sbfControl = sbfControl(functions = nbSBF,
verbose = FALSE,
method = "repeatedcv",
repeats = 5))
confusionMatrix(filteredNB)
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab