prune_recover: Performance evaluation of link predictors

Description Usage Arguments Value Author(s) References Examples

View source: R/assess_link_predictors.R

Description

Given a network of interest and any number of link prediction function names, evaluates the performance of these link predictors by pruning edges from the network and checking if the methods give high likelihood scores to the removed edges. Performance is assessed with four different metrics: Recall@k, AUPR, AUROC and Average Precision.

Usage

1
2
prune_recover(g, ..., probes = seq(0.1, 0.5, 0.1), epochs = 10,
  preserve_conn = FALSE, use_weights = FALSE)

Arguments

g

igraph; The network of interest.

...

character; One or more function names able to produce a tibble with 3 columns, the first two being node IDs (candidate link) and the third their likelihood of interaction. This tibble should be sorted from most to less likely candidate links.

probes

numeric; A vector indicating the fraction of links to be pruned from g at random.

epochs

integer; Number of times each fraction of links is randomly removed.

preserve_conn

logical; Should network connectivity be preserved after edge pruning? This is important for some prediction techniques that can only be applied to connected topologies. To preserve connectivity, the network's Minimum Spanning Tree (MST) is computed and links are pruned around it.

use_weights

logical; If connectivity is to be preserved, this parameter indicates whether the MST should be computed taking edge weights into account.

Value

Tibble with the following columns:

method

Link prediction method.

epoch

Epoch of link removal.

frac_rem

Fraction of links pruned at the specified epoch.

links_rem

Number of links pruned at the specified epoch.

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.

Author(s)

Gregorio Alanis-Lobato galanisl@uni-mainz.de

References

Lu, L. et al. (2015) Toward link predictability of complex networks. PNAS 112(8):2325-2330

Examples

1
2
3
# Assess the performance of three link predictors applied to the Zachary 
# Karate Club network
assessment <- prune_recover(g = karate_club, "lp_cn", "lp_aa", "lp_pa")

galanisl/LinkPrediction documentation built on May 17, 2019, 12:10 p.m.