View source: R/network_evaluation.R
| calculate_metrics | R Documentation | 
Calculates comprehensive performance metrics for evaluating predicted network structures, including classification performance, precision-recall metrics, and network topology metrics.
calculate_metrics(
  network_table,
  ground_truth,
  metric_type = c("all", "auc", "auroc", "auprc", "precision", "recall", "f1",
    "accuracy", "si", "ji"),
  return_plot = FALSE,
  line_color = "#1563cc",
  line_width = 1
)
network_table | 
 A data frame of predicted network structure containing: 
  | 
ground_truth | 
 A data frame of ground truth network with the same format as   | 
metric_type | 
 The type of metric to return, default is  
  | 
return_plot | 
 Logical value, default is   | 
line_color | 
 Color for plot lines, default is   | 
line_width | 
 Width for plot lines, default is   | 
A list containing:
metrics - A data frame with requested metrics
plot - A plot object if return_plot = TRUE (optional)
data("example_matrix")
data("example_ground_truth")
network_table <- inferCSN(example_matrix)
calculate_metrics(
  network_table,
  example_ground_truth,
  return_plot = TRUE
)
calculate_metrics(
  network_table,
  example_ground_truth,
  metric_type = "auroc"
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.