Machine Learning met caret in R
Zach Mayer
Data Scientist at DataRobot and co-author of caret
# Maak een eigen afstemmingsraster
myGrid <- expand.grid(
alpha = 0:1,
lambda = seq(0.0001, 0.1, length = 10)
)
# Fit een model
set.seed(42)
model <- train(
y ~ .,
overfit,
method = "glmnet",
tuneGrid = myGrid,
trControl = myControl
)
# Plot resultaten
plot(model)

plot(model$finalModel)

Machine Learning met caret in R