Code Monkey home page Code Monkey logo

Comments (17)

MechCoder avatar MechCoder commented on July 21, 2024

Is it just to maintain compatibility over sklearn's predict method?

from lightning.

mblondel avatar mblondel commented on July 21, 2024

Not a big deal. This was just to maintain attribute compatibility with scikit-learn.

from lightning.

MechCoder avatar MechCoder commented on July 21, 2024

@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.

mblondel avatar mblondel commented on July 21, 2024

Yes but lightning supports coordinate descent without line search too.

from lightning.

MechCoder avatar MechCoder commented on July 21, 2024

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.

MechCoder avatar MechCoder commented on July 21, 2024

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.

mblondel avatar mblondel commented on July 21, 2024

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.

mblondel avatar mblondel commented on July 21, 2024

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.

MechCoder avatar MechCoder commented on July 21, 2024

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.

mblondel avatar mblondel commented on July 21, 2024

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.

MechCoder avatar MechCoder commented on July 21, 2024

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.

mblondel avatar mblondel commented on July 21, 2024

Indeed, elastic-net is missing from lightning. There is however debiasing which consists in retraining using l2 regularization after the lasso.

from lightning.

MechCoder avatar MechCoder commented on July 21, 2024

So I suppose it counts as different?

from lightning.

mblondel avatar mblondel commented on July 21, 2024

You don't need my permission to work on whatever you like :)

from lightning.

MechCoder avatar MechCoder commented on July 21, 2024

@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.

mblondel avatar mblondel commented on July 21, 2024

It's updated here https://github.com/mblondel/lightning/blob/master/lightning/impl/primal_cd_fast.pyx#L1045

from lightning.

MechCoder avatar MechCoder commented on July 21, 2024

I see thanks.

from lightning.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.