Skip to main content

required_false_positive_rate

Function required_false_positive_rate 

Source
pub fn required_false_positive_rate(
    prevalence: f64,
    recall: f64,
    target_precision: f64,
) -> Result<f64, String>
Expand description

The false-positive rate a detector must not exceed to reach target_precision at prevalence with recall.

This is the build-or-don’t-build number: compare it against what the literature actually achieves, or against a test suite’s flake rate.

§Errors

Inputs outside 0.0..=1.0, or a target precision of 1.0 (which demands a zero false-positive rate and is not a useful target).