Skip to content

[MRG] Allow nd array for CalibratedClassifierCV - #13485

Merged
jnothman merged 6 commits into
scikit-learn:masterfrom
wdevazelhes:more_tolerance_calibrated_classifier
Apr 4, 2019
Merged

jnothman merged 6 commits into
scikit-learn:masterfrom
wdevazelhes:more_tolerance_calibrated_classifier

Conversation

@wdevazelhes

Copy link
Copy Markdown
Contributor

Reference Issues/PRs

Fixes #13077

What does this implement/fix? Explain your changes.

This allows n-dimensional arrays for CalibratedClassifierCV (for instance, GridSearchCV allows for all kind of arrays, since it's a MetaEstimator and more precise tests are made by the encapsulated estimator itself). See #13077 for more details.

@wdevazelhes

Copy link
Copy Markdown
Contributor Author

Is there a reason why CalibratedClassifierCV is not a Meta-Estimator ?

class CalibratedClassifierCV(BaseEstimator, ClassifierMixin):

@wdevazelhes wdevazelhes changed the title Allow nd array for CalibratedClassifierCV [MRG] Allow nd array for CalibratedClassifierCV Mar 21, 2019
@jnothman

jnothman commented Mar 21, 2019 via email

Copy link
Copy Markdown
Member

@jnothman

Copy link
Copy Markdown
Member

Please add a non-regression test

@connorbrinton

connorbrinton commented Apr 1, 2019 •

Copy link
Copy Markdown

@wdevazelhes You might be interested in this PR (by me) which should work with nd-array input (and also supports multi-label probability calibration). It includes tests which you can use if you'd like, to verify that input does not need to be 2d. However, it doesn't include any tests for arrays with more than two dimensions.

@wdevazelhes

wdevazelhes commented Apr 4, 2019 •

Copy link
Copy Markdown
Contributor Author

@connorbrinton Thanks for the reference ! Great, yes indeed your PR would fix my problem with nd-array :)
I'll do a quick non-regression test that maybe can be easily/quickly merged so that you can merge it in your PR

@wdevazelhes

wdevazelhes commented Apr 4, 2019 •

Copy link
Copy Markdown
Contributor Author

@jnothman I just added a non-regression test, let me know how it sounds

Is there a reason why CalibratedClassifierCV is not a Meta-Estimator ?

Probably no reason. MetaEstimatorMixin did very little until recently. Now it only does little.

Allright, I'll open a PR for that then
done: #13575

@jnothman

jnothman commented Apr 4, 2019

Copy link
Copy Markdown
Member

Please merge latest master

@wdevazelhes

Copy link
Copy Markdown
Contributor Author

Please merge latest master

Done

@jnothman

jnothman commented Apr 4, 2019

Copy link
Copy Markdown
Member

Please add an |Enhancement| entry to the change log at doc/whats_new/v0.21.rst. Like the other entries there, please reference this pull request with :issue: and credit yourself (and other contributors if applicable) with :user:

@wdevazelhes

Copy link
Copy Markdown
Contributor Author

Please add an |Enhancement| entry to the change log at doc/whats_new/v0.21.rst. Like the other entries there, please reference this pull request with :issue: and credit yourself (and other contributors if applicable) with :user:

done

@jnothman
jnothman merged commit 11d4cf0 into scikit-learn:master Apr 4, 2019
jeremiedbb pushed a commit to jeremiedbb/scikit-learn that referenced this pull request Apr 25, 2019
xhluca pushed a commit to xhluca/scikit-learn that referenced this pull request Apr 28, 2019
xhluca pushed a commit to xhluca/scikit-learn that referenced this pull request Apr 28, 2019
xhluca pushed a commit to xhluca/scikit-learn that referenced this pull request Apr 28, 2019
koenvandevelde pushed a commit to koenvandevelde/scikit-learn that referenced this pull request Jul 12, 2019
davidgegiya added a commit to davidgegiya/agent-orchestrator that referenced this pull request Nov 8, 2026
…edClassifierCV

Pin 93e09aaae68ec2fc2d7b78818364ca868442e61e and its regression selectors for reproducible runs.

Source: scikit-learn/scikit-learn#13485
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.

Be more tolerant in check_array for CalibratedClassifierCV

4 participants