8000 omp.py: gamma undefined after early break · Issue #540 · scikit-learn/scikit-learn · GitHub
[go: up one dir, main page]

Skip to content

omp.py: gamma undefined after early break #540

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

Closed
josharian opened this issue Jan 6, 2012 · 2 comments
Closed

omp.py: gamma undefined after early break #540

josharian opened this issue Jan 6, 2012 · 2 comments

Comments

@josharian
Copy link

In linear_model/omp.py, function _gram_omp, if optimization ends early due to warn/break right after the while statement, then gamma never gets set before the return. This then raises an UnboundLocalError.

The warning displayed is helpful, but it'd be nice to also set some default value of gamma initially, rather than just bailing. I'd fix and submit a pull request, but I have no idea what an appropriate default value for gamma is. :)

Sorry that I don't have a handy test case for this; I encountered it in the middle of a very long test run (> 1 day) over a lot of data.

@vene
Copy link
Member
vene commented Jan 6, 2012

On Jan 6, 2012, at 20:50 , Josh Bleecher Snyder wrote:

In linear_model/omp.py, function _gram_omp, if optimization ends early due to warn/break right after the while statement, then gamma never gets set before the return. This then raises an UnboundLocalError.

The warning displayed is helpful, but it'd be nice to also set some default value of gamma initially, rather than just bailing. I'd fix and submit a pull request, but I have no idea what an appropriate default value for gamma is. :)

Sorry that I don't have a handy test case for this; I encountered it in the middle of a very long test run (> 1 day) over a lot of data.

Noted, thank you for submitting. I have actually run into this before and forgot about it because of bigger issues. Now is the time to fix it :)


Reply to this email directly or view it on GitHub:
#540

@vene
Copy link
Member
vene commented Jan 8, 2012

Fixed, thanks!

@vene vene closed this as completed Jan 8, 2012
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
0