LinkPredHitRatio
¶
LinkPredHitRatio(k: int)
Bases: LinkPredMetric
Hit ratio @ \(k\): the proportion of examples with at least one relevant item in the top-\(k\).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
k
|
int
|
The number of top-\(k\) predictions to evaluate against. |
required |
Source code in mlx_graphs/metrics/link_pred.py
from mlx_graphs.metrics import LinkPredHitRatio · mlx_graphs/metrics/link_pred.py