Confusion matrix for a logistic cr_result
Arguments
- result
A
cr_resultfromcr_logistic().- threshold
Classification threshold on predicted probability (default
0.5).
Examples
exp <- cr_example_experiment(seed = 1, n_cells_per_well = 30)
res <- cr_logistic(exp, "marker_1", "CompoundA_high", "Untreated")
cr_confusion_matrix(res, 0.5)
#> # A tibble: 1 × 10
#> threshold sensitivity specificity ppv npv accuracy tp tn fp fn
#> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <int> <int> <int> <int>
#> 1 0.5 0.927 0.95 0.952 0.925 0.938 472 456 24 37