Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Aggregation error in R inference algorithm #272

Closed
saraloo opened this issue Jul 30, 2024 · 1 comment · Fixed by #273
Closed

Aggregation error in R inference algorithm #272

saraloo opened this issue Jul 30, 2024 · 1 comment · Fixed by #273
Assignees
Labels
bug Defects or errors in the code. high priority High priority. r-inference Relating to the R inference package.

Comments

@saraloo
Copy link
Contributor

saraloo commented Jul 30, 2024

There is something wrong in the R classical inference when fitting data is weekly (and simulation data is daily, as always).
At first glance it looks like the simulation model output is fitting terribly to the data (below, fitting data are red points, compared to simulation in grey).
Screen Shot 2024-07-30 at 2 53 18 PM

However, it appears as though there is a bug in aggregation somewhere during the likelihood calculations, because multiplying the ground truth data by 7 (or 'equivalently' dividing the simulation output by 7) looks like a great fit.
Screen Shot 2024-07-30 at 2 53 18 PM

Digging a little there is a bug in the aggregation function in the inference R package where the simulation model output is filtered to only the dates that are present in the fitting data (effectively choosing only ONE day of simulated output to compare to WEEKLY fitting data).
Screen Shot 2024-07-30 at 2 53 18 PM

Testing a fix for this now and will PR when I confirm that it works...

@saraloo saraloo added bug Defects or errors in the code. r-inference Relating to the R inference package. high priority High priority. labels Jul 30, 2024
@saraloo saraloo self-assigned this Jul 30, 2024
@jcblemai
Copy link
Collaborator

very good catch

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Defects or errors in the code. high priority High priority. r-inference Relating to the R inference package.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants