I am trying to re-implement the SDNE algorithm for graph embedding by PyTorch.
I get stuck at some issues about evaluation metric Precision@K.
precision@k is a metric which gives equal weight to the returned instance. It is defined as follows
$$precision@k(i) = \frac{\left| \, \{ j \, | \, i, j \in V, index(j) \le k, \Delta_i(j) = 1 \} \, \right|}{k}$$
where $V$ is the vertex set, $index(j)$ is the ranked index of the $j$-th vertex and $\Delta_i(j) = 1$ indicates that $v_i$ and $v_j$ have a link.
I don't understand what "ranked index of the $j$-th vertex" means.
Beside, I am also confused about the MAP metric in section 4.3. I don't understand how to calculate it.
Mean Average Precision (MAP) is a metric with good discrimination and stability. Compared with precision@k, it is more concerned with the performance of the returned items ranked ahead. It is calculated as follows: $$AP(i) = \frac{\sum_j precision@j(i) \cdot \Delta_i(j)}{\left| \{ \Delta_i(j) = 1 \} \right|}$$ $$MAP = \frac{\sum_{i \in Q} AP(i)}{|Q|}$$ where $Q$ is the query set.
If anyone is familiar with these metrics, could you help me to explain them?