freediscovery.metrics.recall_at_k_score

freediscovery.metrics.recall_at_k_score(y_true, y_pred, k)[source]

Recall after retrieving k documents from the collections

Parameters:
  • y_true (ndarray [n_samples]) – array of integer classes
  • y_pred (ndarray [n_samples]) – array of float predicted scores
  • k ({int, float}) – the threashold either float in [0., 1.] or int in [0, n_samples]
Returns:

score – the recall at k score

Return type:

float