Skip to content

FIX: Regression in NearestCentroids#4093

Merged
jnothman merged 1 commit intoscikit-learn:masterfrom
MechCoder:regresssion_nc
Jan 14, 2015
Merged

FIX: Regression in NearestCentroids#4093
jnothman merged 1 commit intoscikit-learn:masterfrom
MechCoder:regresssion_nc

Conversation

@MechCoder
Copy link
Copy Markdown
Member

Fixes #4074

@coveralls
Copy link
Copy Markdown

Coverage Status

Coverage increased (+0.0%) when pulling c872b42 on MechCoder:regresssion_nc into b7d9c3e on scikit-learn:master.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about range(n_classes)?

@amueller
Copy link
Copy Markdown
Member

The fix seems good. I'd use a range instead of a unique, though, as we just used a LabelEncoder.

@MechCoder
Copy link
Copy Markdown
Member Author

fixed

@amueller
Copy link
Copy Markdown
Member

👍

@jnothman
Copy link
Copy Markdown
Member

LGTM.

jnothman added a commit that referenced this pull request Jan 14, 2015
FIX: Regression in NearestCentroids
@jnothman jnothman merged commit 912d142 into scikit-learn:master Jan 14, 2015
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

Successfully merging this pull request may close these issues.

nearest_centroid.py is iterating over all Y labels instead of classes

4 participants