Builds a tuning grid according to the input model.

buildTuningGrid(
  model = "LR",
  penalty_vec = 10^seq(-4, -1, length.out = 10),
  mix_vec = 0:5/5
)

Arguments

model

chr Currently, logistic regression ("LR") is supported.

penalty_vec

num A vector containing penalty (regularization strength) values to try (for logistic regression). Recommended range: 10^-4 to 10^4.

mix_vec

num A vector containing mixture values to try for logistic regression. 0 corresponds to L2 regularization; 1 corresponds to L1; intermediate values (0, 1) correspond to elastic net.

Value

A logistic regression tuning grid as a tibble

Examples

buildTuningGrid(
  model       = "LR",
  penalty_vec = 10^c(-3, -1),
  mix_vec     = c(0, 0.5, 1)
)
#> # A tibble: 6 × 2
#>   penalty mixture
#>     <dbl>   <dbl>
#> 1   0.001     0  
#> 2   0.001     0.5
#> 3   0.001     1  
#> 4   0.1       0  
#> 5   0.1       0.5
#> 6   0.1       1