MulaiMulai sekarang secara gratis

Grid search with range of hyperparameters

In chapter 1, you learned how to use the expand.grid() function to manually define a set of hyperparameters. The same function can also be used to define a grid with ranges of hyperparameters.

The voters_train_data dataset has been loaded for you, as have the caret and tictoc packages.

Latihan ini adalah bagian dari kursus

Hyperparameter Tuning in R

Lihat Kursus

Latihan interaktif praktis

Cobalah latihan ini dengan menyelesaikan kode contoh berikut.

# Define the grid with hyperparameter ranges
big_grid <- expand.grid(___ = ___(___ = 1, ___ = 5, by = ___),
                        decay = c(0, 1))
big_grid
Edit dan Jalankan Kode