Skip to content

Convert predefined metric into a PairsClassifierMixin #169

Open
@bellet

Description

@bellet

A typically use case of metric learning is to use the learned metric to predict whether two examples match or not (as in facial verification applications). This can be the case even though the metric has not been learned from pairwise supervision (positive/negative pairs) but from quadruplet or even fully supervised (e.g., LMNN).

Therefore it would potentially be useful to give a simple way for users to do that for metric learners that are not PairsClassifierMixin.

I see two possible options:

  • add a predict_pairs method and copy the methods to set/calibrate the decision threshold from PairsClassifierMixin introduced in [MRG+1] Threshold for pairs learners #168
    drawback: not compatible with sklearn which expects predict
  • add a new instance of PairsClassifierMixin which takes as input a predefined metric instead of fitting on data, see point 3/ in [MRG+1] Threshold for pairs learners #168 (review)
    drawback: user needs to instantiate a new object after fitting the metric

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions