Generates a precision-recall curve (PRC) for AMR phenotype prediction results.

plotPRC(test_data_plus_predictions)

Arguments

test_data_plus_predictions

A tibble of test data with added prediction columns (e.g. the output of predictML() or runMLmodels(return_pred=TRUE)), or a path to a TSV file containing the same.

Value

A ggplot2 object showing the precision-recall curve.

Details

The function uses yardstick::pr_curve() to compute the PR curve and then visualizes it using ggplot2.

Examples

data(demo_fit)
data(demo_ml_tibble)
preds <- predictML(demo_fit, demo_ml_tibble)
plotPRC(preds)