The way to the OASIS #336
mvargas33
started this conversation in
Show and tell
Replies: 1 comment
-
Thanks @mvargas33! |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
@bellet @perimosocordiae @wdevazelhes @terrytangyuan
I'm opening this discussion in order to clarify the path in which OASIS can be integrated in the package.
I've opened several incremental PR. Each one of these have a different objective:
#333 Will introduce
pair_similarity
andpair_distance
score, while deprecatingscore_pairs
. This will allow to extend the code easily without changing the classifiers and making possible for new types of metrics to be incorporated, not only Mahalanobis. This warns that in release 0.6.4score_pairs
will be completely deleted.#329 Extends the code from #333 and implements
BilinearMixin
, which implements bilinear similarity. As this is not a distance or pseudo-distance, callingpair_distance
will throw an error.get_metric
returns the bilinear similarity. Classifiers work as expected. Test are made to verify integrity.#330 Extends #329 using the BilinearMixin to implement OASIS in
oasis.py
. Core implementation is minimalist. Supervised version already implemented following SCML example. Three main functions are added to_utils.py
:_initialize_similarity_bilinear
: Allow to use a specific bilinear matrix M initialization beforehand, such as random, random_psd, covariance, identity_get_random_indices
: Allow to set the order in which the input (triplets) will feed an algorithm (OASIS)_to_index_points
: Already used by SCML, this method acts as a preprocessor, so that OASIS can work with indices, not the raw data all the time.All these features are fully tested, including a toy use case of OASIS. Will try to make a great example using the "Labeled faces in the wild" dataset (Like sklearn here).
In order to clarify even more, I've made a little diagram showing the main changes in each file and wich PR they're linked to. (diagram here)
I think these incremental PR can help to review specific parts of the code in more detail, better than having to review it all at once. I hope that everything is more clear now.
Let's bring OASIS to metric learn 😁
Beta Was this translation helpful? Give feedback.
All reactions