You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* WIP create MahalanobisMixin
* ENH Update algorithms with Mahalanobis Mixin:
- Make them inherit from Mahalanobis Mixin, and implement the metric_ property
- Improve metric_ property by checking if it exists and raising the appropriate warning if not
- Make tests work, by replacing metric() with metric_
* FIX: add missing import
* FIX: update sklearn's function check_no_fit_attributes_set_in_init to new check_no_attributes_set_in_init"
This new function was introduced through PR scikit-learn/scikit-learn#9450 in scikit-learn.
It also allows to pass tests that would otherwise not pass: indeed having abstract attributes as properties threw an error. But the new test functions handles well this property inheritance.
* FIX: take function ``_get_args`` from scikit-learn's PR scikit-learn/scikit-learn#9450
Indeed, in the PR this function is modified to support python 2. This should solve the CI error.
* ENH: add transformer_ attribute and improve docstring
* WIP: move transform() in BaseMetricLearner to transformer_from_metric() in MahalanobisMixin
* WIP: refactor metric to original formulation: a function, with result computed from the transformer
* WIP: make all Mahalanobis Metric Learner algorithms have transformer_ and metric()
* ENH Add score_pairs function
- Make MahalanobisMixin inherit from BaseMetricLearner to give a concrete implementation of score_pairs
- Use score_pairs to compute more easily predict
- Add docstring
- TST: for every algorithm:
- test that using score_pairs pairwise returns an euclidean distance matrix
- test that score_pairs works for 3D arrays of several pairs as well as 2D arrays of one pair (and there returns only a scalar)
- test that score_pairs always returns a finite output
* TST add test on toy example for score_pairs
* ENH Add embed function
- add the function and docstring
- use it for score_pairs
- TST :
- should be finite
- have right output dimension
- embedding should be linear
- should work on a toy example
* FIX fix error in slicing of quadruplets
* FIX minor corrections
* FIX minor corrections
- remove unusual s to test functions
- remove redundant parenthesis
* FIX fix PEP8 errors
* FIX remove possible one-sample scoring from docstring for now
* REF rename n_features_out to num_dims to be more coherent with current algorithms
* MAINT: Adress #96 (review)
- replace embed by transform and add always the input X in calling the function
- mutualize _transformer_from_metric not to be overwritten in MMC
- improve test_mahalanobis_mixin.test_score_pairs_pairwise according to #96 (comment)
- improve test_mahalanobis_mixin.check_is_distance_matrix
- correct typos and nitpicks
* ENH: Add check_tuples
* FIX: fix parenthesis
* ENH: put docstring of transformer_ in each metric learner
* FIX: style knitpicks to uniformize transformer_ docstring with childs
* FIX: make transformer_from_metric public
* Address #96 (review)
* FIX: fix pairwise distances check
* FIX: ensure random state is set in all tests
* FIX: fix test with real value to test in check_tuples
* FIX: update MetricTransformer to be abstract method and have the appropriate doc
* MAINT: make BaseMetricLearner and MetricTransformer abstract
* MAINT: remove __init__ method from BaseMetricLearner
Since it is an abstract class it already returns an error at instanciation:
TypeError: Can't instantiate abstract class BaseMetricLearner with abstract methods score_pairs
0 commit comments