glm-tools / pyglmnet

Python implementation of elastic-net regularized generalized linear models
http://glm-tools.github.io/pyglmnet/
MIT License
279 stars 83 forks source link

MRG: Convergence #327

Closed pavanramkumar closed 4 years ago

pavanramkumar commented 4 years ago

A few things to note (see review comments):

pavanramkumar commented 4 years ago

closes #319

jasmainak commented 4 years ago

@pavanramkumar our current tests don't test if we stop our iterations too late. Perhaps we should have a test where we know that it converges in less than x iterations (e.g., with scikit-learn data)?

assert glm.n_iter_ < 15

or something like that?

pavanramkumar commented 4 years ago

@pavanramkumar our current tests don't test if we stop our iterations too late. Perhaps we should have a test where we know that it converges in less than x iterations (e.g., with scikit-learn data)?

assert glm.n_iter_ < 15

or something like that?

The problem with this is that we cannot easily distinguish good and bad failures. Some optimization loops with warm restarts legit converge in 10 iterations. So I'd say let's wait to improve this

pavanramkumar commented 4 years ago

@jasmainak tests pass now. good to merge?

codecov-io commented 4 years ago

Codecov Report

Merging #327 into master will decrease coverage by 0.03%. The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #327      +/-   ##
==========================================
- Coverage   75.48%   75.44%   -0.04%     
==========================================
  Files           4        4              
  Lines         673      672       -1     
  Branches      148      147       -1     
==========================================
- Hits          508      507       -1     
  Misses        128      128              
  Partials       37       37
Impacted Files Coverage Δ
pyglmnet/pyglmnet.py 81.04% <100%> (-0.04%) :arrow_down:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 7f5dd22...3966252. Read the comment docs.

jasmainak commented 4 years ago

@pavanramkumar I'm merging this so I can use it for some testing in my PR. I'll update the what's new in my PR