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

OneVsRestCalibrator + IsotonicCalibration output probabilities have a wrong shape #1

Open
perellonieto opened this issue Sep 11, 2020 · 0 comments

Comments

@perellonieto
Copy link
Member

from sklearn.naive_bayes import GaussianNB
from pycalib.models import CalibratedModel, OneVsRestCalibrator, IsotonicCalibration
from sklearn import datasets

X, y = datasets.make_classification(n_classes=3, n_clusters_per_class=1)

cal = CalibratedModel(GaussianNB(), method=OneVsRestCalibrator(IsotonicCalibration()))
cal.fit(X, y)
cal.predict_proba(X).shape

returns the following shape

(2, 100, 3)

While other calibrators (eg. BinningCalibration, SigmoidCalibration) return the correct shape

(100, 3)
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