A function to return a variety metrics for predictions vs actual values. Works well when piped to straight from get_predictions().
get_stats( predictions, biomarker_values, model ="", threshold =300, metrics = c("R","AUPRC"))
Arguments
predictions: (list) A list with two elements, 'predictions' and 'panel_lengths', as produced by the function get_predictions().
biomarker_values: (dataframe) A dataframe with two columns, 'Tumor_Sample_Barcode' and a column with the name of the biomarker in question containing values.
model: (character) The name of the model type producing these predictions.
threshold: (numeric) The threshold for biomarker high/low categorisation.
metrics: (character) A vector of the names of metrics to calculate.