使用 R 的 caret 進行 Machine Learning
Zach Mayer
Data Scientist at DataRobot and co-author of caret
mtrycaret::train() 的 tuneLength 參數caret 要嘗試多少種變化# 載入資料
library(caret)
library(mlbench)
data(Sonar)
# 以更深的調參網格擬合模型
model <- train(
Class ~ .,
data = Sonar,
method = "ranger",
tuneLength = 10
)
# 繪製結果
plot(model)

使用 R 的 caret 進行 Machine Learning