New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Different output than scikit-learn's LASSO on a weird example #173
Comments
Hi Romain, I think both solvers are right: they return a coef_ which is less than some tolerance (which is rescaled version of With
Notice that your objective at 0 is quite low (and within the default tolerance, 1e-4, of the optimal value):
If you decrease tol you get the same results:
|
Also be aware that both celer and sklearn fit an intercept by default. |
Thank you very much for your quick reply ! I'll try to carefully set the tolerance from now on then.
Thanks for pointing this out ! |
The tolerance should be scaled with respect to norm(y) ** 2 or norm(y) ** / n_samples (as is done in sklearn) to make it easier to set. This has been on my todolist for a while: #125 Keep me posted if there's any feature you're missing. this solver should be must faster than sklearn if your data is high dimensional |
Good to know !
I actually want to solve problems with a large number of samples in small dimension. I however have to use a weighted l1 norm in the objective, so that's why I am interested in celer, it turns out there are not many packages allowing to do that easily ! Thanks again for your help and for maintaining this package, it's really pleasant to use ! |
Hi !
I am not sure this is the best place to report this, but I noticed a difference in the ouptut produced by your solver and scikit-learn's. I had a really hard time coming up with some minimal example, sorry if the one below is not really informative. I am using Python 3.7.4 and celer development version on Ubuntu.
So the coefficient I get from scikit-learn's solver is approximately 0.55 (dual gap is 0) and the one I get from your solver is 0 (dual gap is approximately 1e-4).
I know this is a really degenerate use case, so maybe there is no need to worry about it, but I wanted to report this just in case, and ask if there was any reason celer should not be used in such situation.
Thanks in advance for your help !
The text was updated successfully, but these errors were encountered: