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

lambda parameter in sgd not working #13

Open
dustinvtran opened this issue Jan 3, 2015 · 5 comments
Open

lambda parameter in sgd not working #13

dustinvtran opened this issue Jan 3, 2015 · 5 comments
Labels

Comments

@dustinvtran
Copy link
Member

Not sure why, but in my experiments setting lambda to be anything other than zero leads to worse performance. Also the implicit case simply doesn't run.

@dustinvtran dustinvtran added the bug label Jan 3, 2015
@ptoulis
Copy link
Contributor

ptoulis commented Jan 3, 2015

Which experiment is this?

@dustinvtran
Copy link
Member Author

I add the lambda parameter to the R code in MNIST, and partition Kaggle's training data into 75% train and 25% test (since the test data for Kaggle has no labels). Testing it on the 25% test can get horrific, up to 90ish percent misclassification per binary classifier.

@ptoulis
Copy link
Contributor

ptoulis commented Jan 3, 2015

Hmm is this line 73 in the sgd.R?
Do you see this for the implicit? Regularization could be funky here.

@dustinvtran
Copy link
Member Author

Regularization for the explicit case and SVRG work now. The implicit seems to work on simulated data but it simply does not run for MNIST. After adding any non-zero lambda argument to line 44 in examples/exp_logistic_mnist.R:

source("examples/exp_logistic_mnist.R")
## [1] "Running AI-SGD for binary classifier on 0.."
## Error in uniroot(implicit.fn, interval = Bi) :
##   f() values at end points not of opposite sign

The update function fails after less than 10 iterations of the sgd loop.

This is possibly caused by xi multiplying the regularization term lambda*sqrt(sum((theta.old+ksi)^2)) after the implicit solve, c.f., lines 100 and 119 in sgd.R.

@ptoulis
Copy link
Contributor

ptoulis commented Jan 5, 2015

I think the implicit update is incorrect in the regularized version
i need to take a look

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

No branches or pull requests

2 participants