Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- rand_ctrl <- trainControl(method = "repeatedcv", repeats = 5,
- search = "random")
- grid <- expand.grid(alpha=seq(0,1,0.1),lambda=seq(-10,10,1)) # I think this should be modified
- rand_search <- train(Response ~ ., data = train_dat,
- method = "glmnet",
- ## Create 20 random parameter values
- metric = "RMSE",
- tuneLength = 5,
- preProc = c("scale"),
- tuneGrid = grid,
- trControl = rand_ctrl)
Add Comment
Please, Sign In to add comment