# NOT RUN {
data_train = data.frame(
classification=as.factor(c(1,1,0,0,1,1,0,0,1,1)),
A=c(1,1,1,0,0,0,1,1,1,0),
B=c(0,1,1,0,1,1,0,1,1,0),
C=c(0,0,1,0,0,1,0,0,1,0),
D=c(0,1,1,0,0,0,1,0,0,0),
E=c(1,0,1,0,0,1,0,1,1,0))
data_test = data.frame(
classification=as.factor(c(1,1,0,0,1,1,1,0)),
A=c(0,0,0,1,0,0,0,1),
B=c(1,1,1,0,0,1,1,1),
C=c(0,0,1,1,0,0,1,1),
D=c(0,0,1,1,0,1,0,1),
E=c(0,0,1,0,1,0,1,1))
listoffeatures = colnames(data_train)[colnames(data_train)!='classification']
forwardfeatureselection(feamiR::svmlinear,data_train,data_test,listoffeatures)
# }
Run the code above in your browser using DataLab