rafguns/linkpred

I plot ROC curve successfully, but the range of the X axis isn't 0 to 1

Do-no-evil opened this issue · 1 comments

I plot ROC curve successfully, but the range of the X axis isn't 0 to 1

Thanks for the report. I am aware of this but since there isn't a separate issue about it, I will keep this one open.

The reason is that linkpred only calculates ROC curves (or other evaluation curves) for those node pairs for which there actually is a prediction. For many predictors that is just a fraction of all possibilities, leading to plots like the one you obtained.

It might be possible to extend the current code to treat all node pairs for which there is no prediction as effectively zeroes. However, going forward, the better way to handle this in the package would be to replace the implementation of ROC et al. here with the one in scikit-learn, which is more general and robust.