# NOT RUN {
pop <- gafs_initial(vars = 10, popSize = 10)
pop
gafs_lrSelection(population = pop, fitness = 1:10)
gafs_spCrossover(population = pop, fitness = 1:10, parents = 1:2)
# }
# NOT RUN {
## Hypothetical examples
lda_ga <- gafs(x = predictors,
               y = classes,
               gafsControl = gafsControl(functions = caretGA),
               ## now pass arguments to `train`
               method = "lda",
               metric = "Accuracy"
               trControl = trainControl(method = "cv", classProbs = TRUE))
rf_ga <- gafs(x = predictors,
              y = classes,
              gafsControl = gafsControl(functions = rfGA),
              ## these are arguments to `randomForest`
              ntree = 1000,
              importance = TRUE)
	
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab