sparse_ho.criterion.HeldOutMSE¶
- class sparse_ho.criterion.HeldOutMSE(idx_train, idx_val)¶
Held out loss for quadratic datafit.
- Parameters
- idx_train: ndarray
indices of the training set
- idx_val: ndarray
indices of the validation set
- __init__(idx_train, idx_val)¶
Methods
__init__
(idx_train, idx_val)get_val
(model, X, y, log_alpha[, monitor, tol])Get value of criterion.
get_val_grad
(model, X, y, log_alpha, ...[, ...])Get value and gradient of criterion.
get_val_outer
(X, y, mask, dense)Compute the MSE on the validation set.
proj_hyperparam
(model, X, y, log_alpha)Project hyperparameter on a range of admissible values.