We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent abe014e commit a44dfdcCopy full SHA for a44dfdc
metric_learn/base_metric.py
@@ -602,9 +602,7 @@ def predict(self, triplets):
602
prediction : `numpy.ndarray` of floats, shape=(n_constraints,)
603
Predictions of the ordering of pairs, for each triplet.
604
"""
605
- return np.array([-1 if (t <= 0) else 1 for t in
606
- self.decision_function(triplets)])
607
- # return np.sign(self.decision_function(triplets))
+ return 2 * (self.decision_function(triplets) > 0) - 1
608
609
def decision_function(self, triplets):
610
"""Predicts differences between sample distances in input triplets.
0 commit comments