sheepdog: probability-based validation and Bayesian calibration of automated acoustic detections for occupancy models
Abstract
1. Automated classifiers have made Passive Acoustic Monitoring feasible at large scales, but ecological inference depends heavily on how confidence scores translate into detections. Scores are usually calibrated against clips validated across score classes and then thresholded, yet the fit of the calibration is rarely checked, and a curve that reproduces the overall share of true positives may still miss particular times or sites. The threshold then treats every retained prediction as certain, so the validation uncertainty is lost before the detections reach a statistical model. 2. Here, we present sheepdog, an R package that turns the review of classifier detections into documented sampling steps whose uncertainty can be explicitly carried into ecological models. It draws clips for review under designs with known inclusion probabilities, calibrates classifier scores into probabilities of a true positive in a Bayesian framework, checks the calibration against the reviewed clips, and exports the data, with posterior draws of the calibration, in a documented format. The companion package crywolf fits occupancy models with false positives to versions of the detections drawn from the calibration and pools their posteriors. 3. We illustrate the workflow with 15 months of one-minute recordings of the Common Pauraque (Nyctidromus albicollis) detected by a custom classifier and by BirdNET (model V2.4). Both calibrations reproduced the overall share of true positives among the reviewed minutes, but missed a few months, a misfit that seems to follow the calling activity of the species. The calibration accounted for most of the posterior uncertainty of the occupancy intercept, more so with BirdNET, whose calibration rested on 59 reviewed predictions. Both classifiers agreed on negative effects of temperature and humidity. 4. Treating the validation as part of the model, rather than as a separate pre-processing step, reveals how much of the uncertainty of an occupancy estimate comes from the classifier. The documented export lets each step be audited, repeated or replaced.
// Source
Authors: Diogo B. Provete, Liliana Piatti, Larissa Sugai