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

Master Equation and Kinetic model inconsistent with same parameters #102

Open
odunbar opened this issue Jun 10, 2020 · 5 comments
Open

Master Equation and Kinetic model inconsistent with same parameters #102

odunbar opened this issue Jun 10, 2020 · 5 comments
Assignees

Comments

@odunbar
Copy link
Collaborator

odunbar commented Jun 10, 2020

Myself and @agarbuno were looking at efficacy of different tests, and noticed that we seem to get very different paced epidemics when running master equations and kinetic model.

I have run the master and kinetic equations with:

  • same ICs,
  • same transition_rates (set all ensembles to be the transition_rates chosen for
  • same community_transmission_rate

This is achieved by setting
transition_rates_ensemble[i] = transition_rates
transmission_rate_community_ensemble[i] = transmission_rate_community

da_ric_tprobs_

The lines are from the master equation solution, the 'X's are totals for infected, hospitalized and deceased from the kinetic model.

@odunbar
Copy link
Collaborator Author

odunbar commented Jun 10, 2020

To me this looks like some parameters are being rescaled, or being used differently within one of the models?

@odunbar
Copy link
Collaborator Author

odunbar commented Jun 10, 2020

Partially Solved: The kinetic model recently changed the name of it's edge weights from SI->E to exposed_by_infected, therefore the master equations were reading in mean_contact_duration always as 1 .
kinetic_and_master

@odunbar
Copy link
Collaborator Author

odunbar commented Jun 10, 2020

(Possibly) fully solved: The master equations and kinetic equations were not correctly synced in time - due to the start_time = -3/24 setting. I have added a settable start time to the master equations. I also reduced the 6hour static window to 3 hours.
compare_kinetic_and_master

@agarbuno
Copy link
Collaborator

agarbuno commented Jun 11, 2020

I can think of a test to see if the kinetic model and master equations are consistent. But to do so we need to:

  1. keep the contact network static at a given contact interval
  2. run, for this time interval and same contact network, several times the kinetic equations so that we can average the probabilities and compare them to master equations.

Is this possible with the current framework?

@glwagner
Copy link
Collaborator

glwagner commented Jun 11, 2020

Sorry, I did not mean to close this issue.

I opened a PR at #106 that adds a method run_with_static_contacts to the EpidemicSimulator for running with a static contact network. The PR adds an example that simulates an ensemble.

I'm not 100% sure if this is why I was assigned to this issue. Let me know if the PR makes progress towards solving this issue or not.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants