Helper function to define an integer hyperparameter range for Bayesian optimization.

opt_int(low, high, log = FALSE, step = 1L)

Arguments

low

Integer. The lower bound of the range.

high

Integer. The upper bound of the range.

log

Logical. If TRUE, the value is sampled from the range in the log domain.

step

Integer. The discretization step (default 1).

Value

An object of class "opt_param_def".

Examples

# Define search for polynomial degree between 2 and 5
space_degree <- opt_int(2, 5)