Comments (2)
Hi @joelgarde ! Thanks for pointing this out to us, this is so great to see Celer being used in the wild.
Here are the debugging step:
-
This is not a stability issue, we get a difference of 1e-2 which is not due to numerical errors. Numerical errors would be small, like 1e-14
-
By using the verbose mode we see that tomething is wrong in the primal computation, because it does not match the objective that is displayed inside the celer loop :
#########################
##### Computing alpha 1/1
#########################
Iter 0: primal 139.4153891823, gap 1.23e+02, 4 groups in subpb (4 left)
Iter 1: primal 22.8615244139, gap -7.11e-15
Early exit, gap: -7.11e-15 < 2.79e-18
primal value: 2.298344E+01
best primal value: 2.288588E+01
suboptimality: 9.756279E-02
In [2]: celer_primal
Out[2]: 22.983439744552424
In [3]: best_p
Out[3]: 22.885876951049244
Have a look at this line: Iter 1: primal 22.8615244139
(which is lower than the best_p 🥇)
- The difference is due to the fact that celer, by compatibility with sklearn, fits an intercept by default. So the residuals are not
A @ x - y
butA @ x + intercept - y
. See the difference here:
In [25]: (X @ estimator.coef_)[:10]
Out[25]:
array([ 10.91349885, -11.4947074 , 34.10608126, 3.8771897 ,
-12.40119896, 21.48192526, 25.52849388, 33.56151975,
-2.23323574, 9.70506466])
In [26]: estimator.predict(X[:10])
Out[26]:
array([ 11.40729098, -11.00091528, 34.59987338, 4.37098182,
-11.90740684, 21.97571739, 26.022286 , 34.05531187,
-1.73944362, 10.19885679])
In [27]: (X @ estimator.coef_ + estimator.intercept_)[:10]
Out[27]:
array([ 11.40729098, -11.00091528, 34.59987338, 4.37098182,
-11.90740684, 21.97571739, 26.022286 , 34.05531187,
-1.73944362, 10.19885679])
I'm closing, feel free to reopen if this was not the end of the story
from celer.
Great news, I worried for nothing!
Re-tried without intercept and everything's fine up to floating point limits.
Thanks for the quick response.
from celer.
Related Issues (20)
- Turn print statement into a warning HOT 2
- ENH - add warning in ``PN_logreg`` for unhandled case
- Segmentation fault when fitting `GroupLasso` HOT 6
- ENH get rid of inv_lc in lasso_fast.pyx
- ENH use Xw - y instead of y - Xw as dual point HOT 1
- MAINT - Rename ``scal`` by ``dnorm``
- BUG - getting ``ConvergenceWarning`` despite convergence of the solver HOT 1
- DOC link to source code in API documentation
- BUG more than one iteration done when fitting with alpha > alpha_max
- MAINT - Use ``create_dual_point`` in group and multitask lasso
- Feature Request: MultiTask GroupLasso
- float32 input not working with celer_path HOT 2
- BUG - unable to install ``celer`` in an empty python virtual environment HOT 4
- MAINT prune default value different between celer_path and Lasso HOT 1
- ENH add action to build and release macOS (and windows?) wheels HOT 1
- `climate._target_region` incorrectly extracts misaligned column HOT 2
- Feature request: group lasso with overlap / latent group lasso HOT 4
- GroupLasso with positive=True HOT 2
- RuntimeError: Cannot clone object LassoCV(...), as the constructor either does not set or modifies parameter precompute HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from celer.