lasso: Fit lasso model (one iteration)

View source: R/RcppExports.R

lassoR Documentation

Fit lasso model (one iteration)

Description

Minimize .5|| Y - XB ||^2_2 + gamma |B|_1

Usage

lasso(X, Y, B, lambda, niter, fixd = -1L)

Arguments

X

NxP matrix of covariates.

Y

N-vector of response.

B

P-vector of coefficents.

lambda

P-vector L1 regulation coeffs.

niter

Integer, number of lasso iterations to perform.

fixd

Integer, passed from R to indicate the column of the data during the inspre loop. Set to current column index to fix the diagonal of the result to 1.


brielin/inspre documentation built on Dec. 3, 2023, 4:55 a.m.