linkpred icon indicating copy to clipboard operation
linkpred copied to clipboard

UndefinedError: Measure is undefined if there are no relevant or retrieved items

Open umer7267 opened this issue 1 year ago • 1 comments

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()

umer7267 avatar May 11 '23 18:05 umer7267