Skip to content
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

Make _PairsClassifierMixin inherit from ClassifierMixin ? #246

Open
wdevazelhes opened this issue Aug 8, 2019 · 0 comments
Open

Make _PairsClassifierMixin inherit from ClassifierMixin ? #246

wdevazelhes opened this issue Aug 8, 2019 · 0 comments

Comments

@wdevazelhes
Copy link
Member

I just realized from here https://scikit-learn.org/stable/modules/cross_validation.html#computing-cross-validated-metrics, that "When the cv argument is an integer, cross_val_score uses the KFold or StratifiedKFold strategies by default, the latter being used if the estimator derives from ClassifierMixin."
So we would maybe like _PairsClassifierMixin to inherit from ClassifierMixin to have a nice stratification based on the class when doing cross-validation. We could also maybe add an explanatory paragraph about that in the docs.
Note however that ClassifierMixin implements a default score method that is accuracy. I guess it's OK to overwrite it with our own default score (roc_auc) in the end, but it's good to clarify that.

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

No branches or pull requests

1 participant