cv_lasso_early_stopping: Cross-validated LASSO on Indicator Bases

Description Usage Arguments

View source: R/cv_lasso_early_stopping.R

Description

Fits the LASSO regression using a customized procedure, with cross-validation based on origami

Usage

1
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.


jeremyrcoyle/mangolassi documentation built on Dec. 2, 2019, 10:42 p.m.