Comments (17)
Is it just to maintain compatibility over sklearn's predict method?
from lightning.
Not a big deal. This was just to maintain attribute compatibility with scikit-learn.
from lightning.
@mblondel I just want to quickly clarify. The algorithm implemented in lightning is Algorithm 1 in page 4 of this paper http://jmlr.org/papers/volume13/yuan12a/yuan12a.pdf right?
from lightning.
Yes but lightning supports coordinate descent without line search too.
from lightning.
Is it done by using max_steps=0
, because I remember you mentioning, "It adds a lot of code, with no speed benefit"
from lightning.
More specifically this comment, scikit-learn/scikit-learn#2788 (comment) . It seems to me from the documentation that, max_step=0
uses a constant step size. However in the code, it seems that the lipschitz constants
are found when the max_step=0
. So I was getting a bit confused.
from lightning.
Yes, line search is complicated to implement and there's no big benefit in my experience. Have look at Fig. 2 in my paper for a comparison in the case of group lasso. Line search makes a huge difference for full gradient descent algorithms though.
from lightning.
Yes CD without line search is enabled when max_steps=0
. The inverse of the Lipschitz constants are the step sizes for each feature / block. Are you working on a CD solver for scikit-learn?
from lightning.
Ok, I got confused.
Are you working on a CD solver for scikit-learn?
Yes. It was initially part of my GSoC but then it became slightly too much to do. So I am working on it now.
from lightning.
It would be more interesting for me if you could work on something which is not already in lightning (and in scikit-learn).
from lightning.
Actually, the main purpose is Elastic Net regularization for Logistic Regression. I find that only the group lasso penalty has been implemented in lightning. I am using the l1 regularization code in lightning as a base. Does that count?
from lightning.
Indeed, elastic-net is missing from lightning. There is however debiasing which consists in retraining using l2 regularization after the lasso.
from lightning.
So I suppose it counts as different?
from lightning.
You don't need my permission to work on whatever you like :)
from lightning.
@mblondel I'm sorry to keep bugging you, but I promise you it will be only until, I understand the descent code fully.
For your computation of derivatives in https://github.com/mblondel/lightning/blob/master/lightning/impl/primal_cd_fast.pyx#L1019 does b[i]
somehow play the role of y[i] * (w'*X[i])
. If yes, could you tell me where, because I cannot seen it be overwritten anywhere except when set to np.ones(1, n_features)
initially. Or is it something else?
from lightning.
It's updated here https://github.com/mblondel/lightning/blob/master/lightning/impl/primal_cd_fast.pyx#L1045
from lightning.
I see thanks.
from lightning.
Related Issues (20)
- Unsafe screening with CDClassifier? HOT 1
- Forgotten intercept in SGDRegressor HOT 2
- ModuleNotFoundError: No module named 'sklearn.externals.six' HOT 4
- How to pip sklearn-contrib-lightning HOT 2
- 2d errors when passing pandas DataFrame/Series
- Nonnegative penalties actually allowed in CDRegressors HOT 3
- FistaRegressor does not converge for real data HOT 3
- build pb on python 3.9 HOT 1
- Change assert imports HOT 2
- do you have Quantile Regression for spars data after one hot transformation
- do you have Regression for spars categorical big data after one hot transformation
- do you have support vector regression with soft margin and confidence interval ?
- do you have implementation for regression with confidence intervals ?
- Does lightning natively support multi-label HOT 1
- DOC: sometimes the Lasso solution is the same as sklearn, sometimes not HOT 5
- install help
- ENH - Add support of intercept in ``SDCARegressor`` HOT 1
- Why not initialize SAG/SAGA memory with 0 and divide by seen indices so far as in sklearn?
- Missing Support for class-weights specifications to tacke Disproportionate Number of Samples between dependent variable classes
- CDClassifier : error for penalty="l1" and penalty="l2", but no error for penalty="l1/l2" HOT 5
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 lightning.