scikit-learn-contrib / metric-learn

Metric learning algorithms in Python
http://contrib.scikit-learn.org/metric-learn/
MIT License
1.4k stars 234 forks source link

[MRG] Learning on Triplets #279

Closed grudloff closed 4 years ago

grudloff commented 4 years ago

[WIP] Learning on Triplets

This PR is intended to allow the implementation of algorithms that learn on triplets by adding the base class for this kind of learner. The semantic of triplets is similar to quadruplets but the positive and negative pairs are constructed with respect to the first element of the triplet, for this the added code follows closely the one for quadruplets.

The main reason for the creation of this is the implementation of SCML (PR #278) an algorithm that learns on triplets. This will also enable the implementation of future algorithms that learn on triplets.

TODO:

grudloff commented 4 years ago

I think the PR is ready for review now.

bellet commented 4 years ago

@perimosocordiae are you happy with the changes? If so I think we can merge

perimosocordiae commented 4 years ago

LGTM, merged. This is a very nice improvement, thanks @grudloff !

grudloff commented 4 years ago

Great! :) Thanks!