Description Usage Arguments Value Author(s) Examples
View source: R/assess_link_predictors.R
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.
1 2 | plot_lp_performance(res, metric = "recall_at_k", colours = NA,
err = "none")
|
res |
tibble; The result of applying |
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'. |
A ggplot with the performance curve(s) of the assesed prediction method(s).
Gregorio Alanis-Lobato galanisl@uni-mainz.de
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")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.