Description Usage Arguments Value Author(s)
View source: R/assess_link_predictors.R
Given a network of interest, the name of a link predictor, a number of links to prune from the network and a set of removable links, samples edges at random from the removable set and prunes the network. Then applies the link prediction method to the pruned topology and evaluates the prediction with four different metrics: Recall@k, AUPR, AUROC and Average Precision.
1 | prune_predict_assess(g, method, links_rem, removable_links)
|
g |
igraph; A network of interest. |
method |
character; The name of a link prediction function. |
links_rem |
integer; Number of links to prune from the network. |
removable_links |
igraph edge sequence; Set of edges that can be pruned. |
A named numeric vector with the performance of the link predictor. The elements of the vector are:
recall_at_k |
Fraction of top candidates links that are in the set of removed edges. |
aupr |
The area under the Precision-Recall curve. |
auroc |
The area under the Receiving Operating Characteristic curve. |
avg_prec |
The average Precision at the point where Recall reaches its maximum value of 1. |
Gregorio Alanis-Lobato galanisl@uni-mainz.de
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.