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)



A dgCMatrix object corresponding to a sparse matrix of the basis functions generated for the HAL algorithm.


A numeric vector of the observed outcome variable values.


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.


A numeric scalar for the number of folds to be used in the cross-validation procedure to select an optimal value of lambda.