Calculate AUROC and AUPRC
calc_aucs(trained_model, test_data, outcome_colname, outcome_value)
trained_model | trained model from caret |
---|---|
test_data | held out test data: dataframe of outcome and features |
outcome_colname | Column name as a string of the outcome variable (default |
outcome_value | Outcome value of interest as a string (default |
List of auroc and auprc values
Zena Lapp, zenalapp@umich.edu
Kelly Sovacool, sovacool@umich.edu
calc_aucs(trained_model_mini, test_data_sm, "dx", "cancer")#> $auroc #> [1] 0.5710526 #> #> $auprc #> [1] 0.5438684 #>