This dashboard is powered by a Bayesian hierarchical Negative Binomial model, fit using PyMC via MCMC sampling (NUTS). The outcome is the number of detections for a given species within a given hourly window, including true zeros for hours when nothing was heard. A negative binomial likelihood was chosen over Poisson because detection counts are highly overdispersed — some species (like Carolina Wren and Gray Catbird) call in bursts, producing far more variance than a Poisson model can explain. Four weather and time covariates enter the model as standardized fixed effects, while species is treated as a random intercept on the log scale, letting each species have its own baseline calling rate, with sparse species pulled toward the group average. The model is retrained daily as new detections accumulate, and a new version is only promoted to production if it has a better estimated out-of-sample fit (via LOO cross-validation) than the current one. The current formulation is shown below, where count is assumed to follow a Negative Binomial distribution with mean μ and dispersion α.
log(μ) = β0 + β1·Temp + β2·Humidity + β3·Pressure + β4·TimeOfDay + uspecies
count ∼ NegBinomial(μ, α)
uspecies ∼ Normal(μspecies, σ²species)
Coefficients and predictions shown above reflect the current production model version.