Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

MRG allow (n_samples, 1) input for all classifiers #2251

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 0 commits into from
Jul 26, 2013

Conversation

amueller
Copy link
Member

Fixes issue #604, makes all estimators behave in a uniform and predictable way.

@amueller
Copy link
Member Author

ping @GaelVaroquaux ;)

@agramfort
Copy link
Member

travis is not happy

@larsmans
Copy link
Member

The naive Bayes tests are failing: apparently this patch is making them return floats from predict.

@@ -227,6 +231,18 @@ def check_arrays(*arrays, **options):
return checked_arrays


def make_y_1d(y):
Copy link
Member

Choose a reason for hiding this comment

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

You should have a look at _column_or_1d in the metrics module.

Copy link
Member Author

Choose a reason for hiding this comment

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

right, I forgot about that :-/ why is it in the metrics module?

Copy link
Member

Choose a reason for hiding this comment

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

Because it has only been used in this module and was a private function.

For the metrics, it ensure consistent behaviour with respect to broadcasting.

Copy link
Member Author

Choose a reason for hiding this comment

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

ok, I'll move it into utils and rename the trailing underscore, ok?

Copy link
Member

Choose a reason for hiding this comment

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

OK ! :-) by the way the name was finally found by @jnothman and approved by @GaelVaroquaux and me.

Copy link
Member Author

Choose a reason for hiding this comment

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

I'm pretty sure now I actually reviewed it. But somehow it slipped my mind ;)

@amueller
Copy link
Member Author

travis is happy now

@amueller
Copy link
Member Author

@larsmans I went a bit overboard when I tried to improve the input validation in the NB, which was only slightly related ;)

@larsmans
Copy link
Member

I'm still a bit ambivalent about how useful this is. But I guess it improves the symmetry and the code looks good.

@amueller
Copy link
Member Author

the alternative would be to replace the call to column_or_1d with raise ValueError("learn numpy"). I think this solution is better ;)

@larsmans
Copy link
Member

Actually putting in that error message is very tempting. But the exception type should be PEBKAC.

@arjoly
Copy link
Member

arjoly commented Jul 26, 2013

Funny PEBKAC ! :-)

@amueller
Copy link
Member Author

@larsmans but would you also put that into KNeighborsClassifier that suppored (n_samples, 1) input and break backward compatibility? or put in a deprecation message that this support will change?

@arjoly
Copy link
Member

arjoly commented Jul 26, 2013

@larsmans but would you also put that into KNeighborsClassifier that suppored (n_samples, 1) input and break backward compatibility? or put in a deprecation message that this support will change?

Just to let you know if you haven't noticed, knn now support multi-output data

@amueller
Copy link
Member Author

it does? oh, I thought it wasn't merged yet. whoops. was it merged at the sprint?

@arjoly
Copy link
Member

arjoly commented Jul 26, 2013

yes :-)

@arjoly
Copy link
Member

arjoly commented Jul 26, 2013

Look good to merge

@amueller
Copy link
Member Author

oh ok. but it did support the input format before this afternoon ;)

@amueller amueller closed this Jul 26, 2013
@amueller amueller reopened this Jul 26, 2013
@amueller
Copy link
Member Author

damn misclicks :-/

@larsmans
Copy link
Member

@amueller No, you're right. +1 for merge.

@amueller
Copy link
Member Author

ok, will merge.

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.

4 participants
Morty Proxy This is a proxified and sanitized view of the page, visit original site.