plot_lp_performance: Plot the performance evaluation of link predictors

Description Usage Arguments Value Author(s) Examples

View source: R/assess_link_predictors.R

Description

Given the assessment of one or more link predictors with function prune_recover, plots the performance curves of the analysed methods using the chose metric. Each point corresponds to the average performance for a specific fraction of removed links across all considered epochs.

Usage

1
2
plot_lp_performance(res, metric = "recall_at_k", colours = NA,
  err = "none")

Arguments

res

tibble; The result of applying prune_recover to a network.

metric

character; The metric that we want to plot. Should be one of 'recall_at_k', 'aupr', 'auroc' or 'avg_prec'.

colours

character/numeric; A vector of colours to depict the performance curve of each link prediction method. There should be as many colours as assessed link predictors.

err

character; Include or not error bars in the plot. It should be one of 'none', 'sd' or 'se'.

Value

A ggplot with the performance curve(s) of the assesed prediction method(s).

Author(s)

Gregorio Alanis-Lobato galanisl@uni-mainz.de

Examples

1
2
3
4
5
6
7
8
9
# 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")

# Define a set of colours to plot
colours <- c("#8da0cb", "#fc8d62", "#66c2a5")

# Plot the performance curves of the considered link predictors
perf <- plot_lp_performance(assessment, colours = colours, err = "sd")

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