Fits Lasso regression over a single fold of a cross-validated data set. This
is meant to be called using cross_validate
, which is
done through cv_lasso
. Note that this procedure is NOT meant
to be invoked by itself. INTERNAL USE ONLY.
lassi_origami(fold, data, lambdas, center = FALSE)
A fold
object produced by a call to make_folds
from the origami.
A dgCMatrix
object containing the outcome values (Y) in
its first column and vectors corresponding to the basis functions of HAL in
all other columns. Consult the description of HAL regression for details.
A numeric
vector corresponding to a sequence of lambda
values obtained by fitting the Lasso on the full data.
binary. If TRUE
, covariates are centered. This is much
slower, but matches the glmnet
implementation. Default FALSE
.