8000 0.8.x: FIX: lars_path -- assure that at least some features get added if necessary by yarikoptic · Pull Request #168 · scikit-learn/scikit-learn · GitHub
[go: up one dir, main page]

Skip to content

0.8.x: FIX: lars_path -- assure that at least some features get added if necessary #168

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

Merged
merged 3 commits into from
May 13, 2011

Conversation

yarikoptic
Copy link
Member

Otherwise can run into situation when max_features == n_active, so add_features
becomes == 0, thus no actual resize happens, and then next assignment to coefs
fails.

please cherry into master upon acceptance

…essary

Otherwise can run into situation when max_features == n_active, so add_features
becomes == 0, thus no actual resize happens, and then next assignment to coefs
fails.
@GaelVaroquaux
Copy link
Member

Nice! Any chance you could provide us with a small test case?

@yarikoptic
Copy link
Member Author

should I merge those 3 commits into 1 for easy cherry picking into master?

@GaelVaroquaux
Copy link
Member

If you wish, but it is absolutely not compulsory.

@yarikoptic
Copy link
Member Author

Ok - lets leave it as 3 commits ;)

Backtrace for the failure case:

  File "/home/yoh/deb/gits/scikit-learn/scikits/learn/linear_model/least_angle.py", line 391, in fit
    max_features=max_features)
  File "/home/yoh/deb/gits/scikit-learn/scikits/learn/linear_model/least_angle.py", line 230, in lars_path
    gamma_ * least_squares
IndexError: index (7) out of range (0<=index<6) in dimension 0

@GaelVaroquaux
Copy link
Member

OK, I am merging. This is good thanks.

GaelVaroquaux added a commit that referenced this pull request May 13, 2011
0.8.x: FIX: lars_path -- assure that at least some features get added if necessary
@GaelVaroquaux GaelVaroquaux merged commit 7eae6e0 into scikit-learn:0.8.X May 13, 2011
Sign up for free to join this conversation on GitHub. Already have an account? 59AD Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0