Open memoryz opened 3 years ago
In your R example, did you mean intercept=FALSE
, consistent with the Python example?
I looked at this, and am not sure what objective function Breeze's lasso is using. I am not familiar with that implementation of Lasso shrinkage, but maybe it's somehow equivalent to the usual form (from scikit-learn) ?
The lasso regression from breeze does not match with scikit-learn or R (glmnet).
Testing code:
val a = BDM((1.0, 1.0), (2.0, -2.0), (3.0, 3.0), (4.0, 5.0)) val b = BDV(1.01, 1.98, 3.03, 4.05) val lambda = 0.5d val result = lasso(a, b, lambda) println(result.coefficients)
scikit-learn more or less agrees with R, but breeze's results differ quite a lot when lambda is bigger.