model.result.top.var: Train model Random Forest for the top-N variables N =...

Description Usage Arguments Details Value Examples

View source: R/rf.model.R

Description

Train model Random Forest for the top-N variables N = 5,10,15,20,30,40,50,75,100

Usage

1
model.result.top.var(x, y, list.selected.var, list.index.cross)

Arguments

x

input data where columns are variables and rows are observations (all numeric)

y

decision variable as a boolean vector of length equal to number of observations

list.selected.var

A list with selected variables in cross-validation

list.index.cross

A list with indexes obtained in cross-validation

Details

Train model Random Forest in cross-validation and variables selected in the cross-validation for the top-N variables N = 5,10,15,20,30,40,50,75,100

Value

A data.frame with metrics Accuracy, AUC, MCC for the top-N variables N = 5,10,15,20,30,40,50,75,100

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
class <- data$class
data$class <- NULL

list.index.cross <- cross.validation(x = data, y = class, method= 'cv.kfold', k = 3, niter = 10)

list.selected.var <- feature.selection(x = data,
                             y = class,
                             method = 'fs.utest',
                             list.index.cross = indexes,
                             params = list(adjust = 'holm'))

model.result <- model.result.top.var(x = data,
                                     y = class,
                                     list.selected.var = list.selected.var,
                                     list.index.cross = list.index.cross)

pavhrablis/benchmarkFS documentation built on Feb. 5, 2021, 12:47 a.m.