Machine Learning with caret in R
Zach Mayer
Data Scientist at DataRobot and co-author of caret
tuneGrid
argumentcaret
models# Define a custom tuning grid
myGrid <- data.frame(mtry = c(2, 3, 4, 5, 10, 20))
# Fit a model with a custom tuning grid
set.seed(42)
model <- train(
Class ~ .,
data = Sonar,
method = "ranger",
tuneGrid = myGrid
)
# Plot the results
plot(model)
Machine Learning with caret in R