有没有办法控制插入符号中GA算法选择的要素数量?我尝试设置gafs_initial()中提到的vars参数,我相信它是由gafs()继承的,但我似乎并不是控制它的方法。
ctrl <- gafsControl(functions = caretGA,
verbose = T,
allowParallel = T,
metric=c(internal='Rsquared',external='RMSE'),
maximize = c(internal = TRUE, external = FALSE))
ga <- gafs(x = x,
y = y,
iters = 25,
vars=5,
gafsControl = ctrl,
method = "lm")