Generates a bar plot that compares model performance with and without randomly shuffled AMR phenotype labels.

plotBaselineComparison(non_shuffled_label_results, shuffled_label_results)

Arguments

non_shuffled_label_results

Output of runMLPipeline() (shuffle_labels = FALSE)

shuffled_label_results

Output of runMLPipeline() (shuffle_labels = TRUE)

Value

A bar plot with balanced accuracy comparisons per antibiotic

Examples

non_shuffled <- tibble::tibble(
  antibiotic = c("AMP", "CIP", "CRO"),
  bal_acc    = c(0.88, 0.81, 0.92)
)
shuffled <- tibble::tibble(
  antibiotic = c("AMP", "CIP", "CRO"),
  bal_acc    = c(0.52, 0.49, 0.55)
)
plotBaselineComparison(non_shuffled, shuffled)

#>      [,1] [,2] [,3]
#> [1,]  1.5  4.5  7.5
#> [2,]  2.5  5.5  8.5