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: roc_auc when y not in [0, 1] #3874

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 2 commits into from
Dec 22, 2016
Merged

Conversation

kingjr
Copy link
Member

@kingjr kingjr commented Dec 22, 2016

Fixes error when scoring='roc_auc' and y is not in [0, 1]:

Should be ultimately solved in scikit-learn/scikit-learn#6874

Replaces #3717, Closes #3697

@codecov-io
Copy link

codecov-io commented Dec 22, 2016

Current coverage is 85.58% (diff: 100%)

Sunburst

No coverage report found for master at 5355095.

Powered by Codecov. Last update 5355095...6b59085

if scoring is not None:
if hasattr(scoring, '_score_func'):
if hasattr(scoring._score_func, '__name__'):
if scoring._score_func.__name__ == 'roc_auc_score':
Copy link
Member

Choose a reason for hiding this comment

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

can you avoid the 4 if and use just one with some 'and'

thx

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 had done this with '&' and it didn't work, but hadn't thought it'd differ from 'and'. Learn something everyday ..

# -- 2 class problem not in [0, 1]
y = np.arange(len(X)) % 2 + 1
gl.fit(X, y)
gl.score(X, y)
Copy link
Member

Choose a reason for hiding this comment

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

can you check that the results are correct?

here you just check it runs

@kingjr kingjr changed the title FIX: roc_auc when y not in [0, 1] MRG: roc_auc when y not in [0, 1] Dec 22, 2016
@agramfort agramfort merged commit ab42e6a into mne-tools:master Dec 22, 2016
@agramfort
Copy link
Member

thx @kingjr

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.

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