底层还是根据你本来在R跑单独那一个机器学习的函数,例如randomForest::randomForest(),里面可以填入什么,然后跟你的实际数据取值范围去设个范围。然后用auto_tuner()函数对学习器的超参数自动调参
随机森林randomforest
learner_rf <- lrn("classif.ranger",
mtry=to_tune(2,15),
min.node.size = to_tune(1,10),
num.trees = to_tune(50,1000),
splitrule = "gini",
importance = "impurity",
predict_type = "prob")
xgboost
learner_xgb = lrn(
"classif.xgboost",
eta = to_tune(1e-4, 1),
nrounds = to_tune(1, 5000),
max_depth = to_tune(1, 20),
colsample_bytree = to_tune(1e-1, 1),
colsample_bylevel = to_tune(1e-1, 1),
lambda = to_tune(1e-3, 1e3, logscale = TRUE),
alpha = to_tune(1e-3, 1e3, logscale = TRUE),
subsample = to_tune(1e-1, 1),
predict_type = "prob",
verbose = 0
)
支持向量机 SVM
learner_SVM <- lrn("classif.svm", type = "C-classification", kernel = "radial",
cost = to_tune(0.1, 10),predict_type="prob",
gamma = to_tune(0, 5))