pbreheny / biglasso

biglasso: Extending Lasso Model Fitting to Big Data in R
http://pbreheny.github.io/biglasso/
113 stars 29 forks source link

Proper way to incorporate penalty.factor #20

Open privefl opened 5 years ago

privefl commented 5 years ago

Two questions/remarks:

  1. I would have expected the same results (with rescaled lambda sequences)

    data(colon); X.bm <- as.big.matrix(colon$X); y <- colon$y
    fit.lasso  <- biglasso(X.bm, y, family = 'gaussian')
    fit.lasso2 <- biglasso(X.bm, y, family = 'gaussian',
                       penalty.factor = rep(100, ncol(X.bm)))

    Looking at the code of {glmnet}, it seems that they rescale the multiplicative factors (by dividing by their mean). Should {biglasso} do the same here?

  2. What is the (implementation) problem with having some penalty factor as 0? (you don't allow unpenalized variables in the current version)