R/GeneralizationOpt.R
GeneralizationOpt.RdR interface to Python's GPopt.GeneralizationOpt. Explores a
hyperparameter space with Sobol sequences, fits a surrogate model to the
generalization gap (train vs. test performance), and lets you compute
Sobol sensitivity indices and run diagnostics – useful to understand
*which* hyperparameters drive over/under-fitting, beyond just tuning for
best validation score.
GeneralizationOpt(hyperparams, random_state = 42L, venv_path = "./venv")a named list describing the hyperparameter space, in the form `list(param_name = c(min_val, max_val, log_scale))`, e.g. `list(nu = c(0.001, 10, TRUE), lam = c(1e-4, 1e4, TRUE))`
integer random seed
path to the Python virtual environment created with `uv` (see the package README for setup instructions)
A Python `GPopt.GeneralizationOpt` object. Useful members (accessed with `$`):
`$generate_sobol_samples(n = ...)`
`$evaluate_configurations(...)`
`$fit_surrogate(surrogate = ..., target_gap = "gap_abs")`
`$compute_sobol_indices(...)`
`$optimize_acquisition(...)`
`$run_diagnostics(...)`