Skip to content

OneVsRestCalibrator + IsotonicCalibration output probabilities have a wrong shape #1

Open
@perellonieto

Description

@perellonieto
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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions