Fits the LASSO regression using a customized procedure with cross-validation
based on origami
cv_lasso_early_stopping(x_basis, y, n_lambda = 100, n_folds = 10)
Arguments
| x_basis |
A dgCMatrix object corresponding to a sparse matrix of
the basis functions generated for the HAL algorithm. |
| y |
A numeric vector of the observed outcome variable values. |
| n_lambda |
A numeric scalar indicating the number of values of
the L1 regularization parameter (lambda) to be obtained from fitting the
LASSO to the full data. Cross-validation is used to select an optimal
lambda (that minimizes the risk) from among these. |
| n_folds |
A numeric scalar for the number of folds to be used in
the cross-validation procedure to select an optimal value of lambda. |