Solved – LARS – LASSO with weights

generalized-least-squareslarslasso

I am interested in solving the following problem

$$ \min_{\boldsymbol{\beta}} \left( \mathbf{y}-\mathbf{X}\boldsymbol{\beta} \right)^T W \left( \mathbf{y}-\mathbf{X}\boldsymbol{\beta} \right) + \lambda \left|\boldsymbol{\beta}\right|_1 $$

$\mathbf{y}$ is the vector of observations for each dataset.

$\mathbf{X}$ is the matrix of predictors.

$\boldsymbol{\beta}$ is the set of regression coefficients.

$\mathbf{W}$ is a diagonal matrix filled with positive real numbers.

using the LARS-Lasso approach. Is there any existing package that does this, meaning that it accepts weights for each as an input?

With all the normalizing of the datasets (centering and scaling) that need to be done, I am hesitant to pre-process my data and multiply both the observation and the predictors with $\sqrt{W}$ and feed it in to the algorithm.

Best Answer

The glmnet Package solves the lasso problem using coordinate descent. It also provides features for adding in weights

Related Question