Skip to content

LinkPredRecall

LinkPredRecall(k: int, weighted: bool = False)

Bases: LinkPredMetric

Recall @ \(k\): the proportion of the relevant items that appear in the top-\(k\) recommendations.

Parameters:

Name Type Description Default
k int

The number of top-\(k\) predictions to evaluate against.

required
weighted bool

Whether to weight the items by edge_label_weight. Default: False

False
Source code in mlx_graphs/metrics/link_pred.py
def __init__(self, k: int, weighted: bool = False):
    super().__init__(k)
    self.weighted = weighted

from mlx_graphs.metrics import LinkPredRecall · mlx_graphs/metrics/link_pred.py