linkpred
linkpred copied to clipboard
UndefinedError: Measure is undefined if there are no relevant or retrieved items
I am getting the undefined error when plotting ROC Curve of an evaluation using the following code:
n = len(test)
num_universe = n * (n - 1) // 2
test_set = set(linkpred.evaluation.Pair(u, v) for u, v in test.edges())
evaluation = linkpred.evaluation.EvaluationSheet(cn_results, test_set, num_universe)
plt.plot(evaluation.fallout(), evaluation.recall())
plt.show()
Hi! Can you share the network test? For instance, as an edgelist or in some other networkx-compatible format?
Closing due to lack of information. Please reopen if you have more info on how to reproduce.