Learn R Programming

rtemis (version 1.4.3)

tuning_grid: Tuning grid of a Hyperparameters object

Description

The set of hyperparameter combinations a grid search would fit, one per row. Derived from the object, so it can be inspected before train() is called.

Usage

tuning_grid(x)

Value

data.frame with one row per combination and one column per searched hyperparameter, or NULL if nothing needs tuning.

Arguments

x

Hyperparameters object.

Author

EDG

Details

The grid is the cross product of the search values, reduced by two rules:

  • A hyperparameter that declares it applies only under certain values of another is set to NA -- meaning "left unset for this fit" -- in the rows that do not meet them. reduce_basis applies only at smoothness_orders of 0, so a search over both drops it from the higher-order rows.

  • Rows that become identical once that is done are collapsed, so a combination is never fit, scored, and ranked twice.

tune_GridSearch() fits exactly these rows, so what this prints is what will run.

Examples

Run this code
# reduce_basis applies only at smoothness order 0, so the six combinations
# of the cross product reduce to four.
tuning_grid(
  setup_HAL(
    smoothness_orders = tune_over(0L, 1L, 2L),
    reduce_basis = tune_over(0.1, 0.5)
  )
)

Run the code above in your browser using DataLab