Skip to content

Be more tolerant in check_array for CalibratedClassifierCV #13077

@wdevazelhes

Description

@wdevazelhes

For our package http://github.com/metric-learn/metric-learn, the function CalibratedClassifierCV is very convenient for Weakly Supervised Learners, as it can make PairsClassifier estimators return a probability for a pair of points to be labeled as similar or dissimilar, when those return a decision function.

However, we currently cannot use it because our inputs can be 3D (example: pairs=[[[2.3, 5.4], [4.4, 5.6]], [[7.5, 1.2], [4.4, 5.6]]]), and CalibratedClassifierCV uses check_array with default parameters that does not allow 3D inputs.

However, other meta-estimators like GridSearchCV do not call check_array, so we can use them easily in metric-learn.

Is the check_array in CalibratedClassifierCV really useful or could we do without it ? If we could, I'd be happy to provide a PR to do so

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