# 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))
geneticalgorithm(
feamiR::svmlinear,
k=2,
data_train,
data_test,
parallel=FALSE,
maxiter=5,
maxiter_withoutimprovement=5,
popsize=10)
# }
Run the code above in your browser using DataLab