# 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))
data = read.csv(paste(system.file('samples/subsamples', package = "feamiR"),'/sample0.csv',sep=''))
data = rbind(head(data,50),tail(data,50))
data$classification = as.factor(data$classification)
ind <- sample(2,nrow(data),replace=TRUE,prob=c(0.8,0.2))
data_train <- data[ind==1,]
data_test <- data[ind==2,]
eGA(k=7,data_train,data_test,maxnumruns=3)
# }
Run the code above in your browser using DataLab