cblearn.metrics.query_accuracy#
- cblearn.metrics.query_accuracy(true_response, pred_response)[source]#
Fraction of violated triplet constraints.
For all triplets (i, j, k), count R * (||O(j) - O(i)|| - ||O(k) - O(i)||) > 0 and divide by the number of triplets.
- Parameters:
- Returns:
Number between 0 and 1, indicating the fraction of triplet constraints which are violated.
- Return type: