naobservatory / p2ra

4 stars 1 forks source link

Don't emit zeros for any predictor #151

Closed jeffkaufman closed 1 year ago

jeffkaufman commented 1 year ago

Zero is no good: we take the log of values, and if they're zero that explodes.

For Norovirus the issue was that we look at the I/II ratio and if either of those is zero then we'll emit a zero for that pathogen; in that case we can fall back to the annual average ratio.

For Influenza the issue was that some weeks had zero positive tests; in that case we somewhat unprincipledly treat it as if there were really 0.1 positive tests.

Fixes #148, with a test to verify it stays fixed.