linkpred icon indicating copy to clipboard operation
linkpred copied to clipboard

ZeroDivisionError

Open TaousDev opened this issue 5 years ago • 3 comments

https://github.com/rafguns/linkpred/blob/ae7adc8147204e8d0564df72d33e486df62dab50/linkpred/predictors/neighbour.py#L28

in AdamicAdar i got ZeroDivisionError : floar division by zero

Any idea on how to fix this ? Thank you

Capture

TaousDev avatar Sep 11 '20 17:09 TaousDev

Thanks for the report. This looks like a bug. Can you provide a minimal test case (small graph) where the problem occurs?

rafguns avatar Sep 12 '20 07:09 rafguns

I managed to fix it, using numpy, instead of math.log() I used numpy.log()

I'm also having trouble around the universe term that is used in EvaluationSheet(), I need this to get the confusion matrix and accuracy

Thank you

TaousDev avatar Sep 12 '20 07:09 TaousDev

Thanks. Good to know that it can be solved using numpy.log but I woud like to understand the issue before applying a fix. So if you can supply an example, that would still be much appreciated.

Can you open a separate issue relating to EvaluationSheet? Thanks!

rafguns avatar Sep 12 '20 19:09 rafguns