Skip to content
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

Reg param in StochasticGradientDescent optimizator #1

Open
petro-rudenko opened this issue Jun 30, 2015 · 1 comment
Open

Reg param in StochasticGradientDescent optimizator #1

petro-rudenko opened this issue Jun 30, 2015 · 1 comment

Comments

@petro-rudenko
Copy link

Hi, thanks for the library. From initial benchmarks for my ml pipelines seems to be faster than LBFGS. But accuracy for logistic regression is worth. Would be cool to handle reg parameter in StochasticGradientDescent the same way Spark's minibatch SGD does.

@zhangyuc
Copy link
Owner

Thanks for asking. When incorporating L-2 regularization into AdaGrad, there is no easy way to handle sparse features, i.e. the per-sample complexity has to be proportional to the feature dimension instead of the number of non-zero entries. If you want a regularization term, you may encode it into the Gradient function, or stop the algorithm after several passes over the dataset. For AdaGrad SGD, early stopping is roughly equivalent to L-2 regularization.

In the Example page, there is a traditional SGD implementation that supports regParam. But traditional SGD is not as fast as AdaGrad in practice.

We will implement more stochastic algorithms in the future, such as SVRG, that is fast enough and handles the regularization more easily.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants