Session Ready
Exercise

Tune hyperparameters manually

If you already know which hyperparameter values you want to set, you can also manually define hyperparameters as a grid. Go to modelLookup("gbm") or search for gbm in the list of available models in caret and check under Tuning Parameters.

Note: Just as before,bc_train_data and the libraries caret and tictoc have been preloaded.

Instructions
100 XP
  • Define the following hyperparameter grid for a Gradient Boosting Model: the number of trees as 200; the tree complexity as 1; the learning rate as 0.1 and the minimum number of training set samples in a node to commence splitting as 10.
  • Apply the grid to the train() function of caret.