tuning_grid: Tuning grid of a Hyperparameters object

tuning_gridR Documentation

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)

Arguments

x

Hyperparameters object.

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.

Value

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

Author(s)

EDG

Examples

# 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)
  )
)

rtemis documentation built on Oct. 20, 2026, 1:06 a.m.