cblearn.preprocessing.triplets_from_mostcentral#
- cblearn.preprocessing.triplets_from_mostcentral(X, y=None)[source]#
Calculates triplets from most-central queries.
The most-central query consists of k objects, of which one is most similar to all others.
Note
For this transformation, we are assuming that the objects respect the triangle inequality. This might not always be a given and is not checked by this function.
- Parameters:
- Returns:
Array of triplet queries (n_query * (n_choices - 2) * (n_choices - 1), 3)
- Return type:
triplets