Skip to contents

True and false positives and negatives of pred >= thr against presence, with the three rates the range rule reports. Against random background a "false positive" is only a background point above the threshold, so spec and precision describe the model against its background, not against true absence.

Usage

confusion_at(pred, presence, thr)

Arguments

pred

numeric predictions

presence

1 (or TRUE) for a presence, 0 for a background / absence point

thr

threshold on the scale of pred

Value

a one-row data frame: thr, tp, fp, tn, fn, sens, spec, precision