Comments (11)
Right, this is mainly to produce numbers per day for big populations, probably good to document when not to use dynamic resampling
from covasim.
We won't want to start from a single infection -- too much stochasticity anyway. This question is a good one, related to this:
https://github.com/amath-idm/covasim/issues/23
from covasim.
Idea @cliffckerr had and I'll prototype:
When we reach certain threshold of infections (say, 50%, but configurable) we scale up frame of reference by 2 (or later, configurable).
That means:
- De-infect random 50% of infected
- Resurrect 50% of dead
- Re-susceptible(?) 50% of recovered
- Multiply every summary stat by 2
from covasim.
@inc0 sounds good. the main change that needs to happen is to expand the definition of scale
to have it be an array of length n_days
rather than a scalar (or better, keep scale a scalar but introduce a scalevec
parameter for this). but yeah basically just loop over 50% of all non-susceptibles and restore them to the susceptible state (no method for this currently, but should be added)
from covasim.
Doesn't scaling affect elimination dynamics and the time to the epidemic peak? You can't just re-scale the y-axis on your plots. And now if you want to start with 500 cases in the real population of 5,000,000 but it is implemented as 1 case in an actual population of 10,000 people, then you will get tons of stochasticity when there shouldn't be with 500 initial cases.
from covasim.
@dlchao it's a good point, we'll need to be able to scale down as well as up! but the idea is to get around exactly that -- we start with 500 cases in a population of 50k, and then when we get to 5000 cases we rescale to 500k, etc. -- so we never have fewer than 500 simulated cases but also never have more than 5000
from covasim.
Another thing is that we're rescaling by factor of 2 by default and scaling multiple times (every few days once epidemy picks up).
example: 10k internal population and 2M target population, start with 10 infections:
- keep going until you reach 5000 or less susceptibles
- cut make half of non-susceptibles susceptible again, multiply all numbers by 2
- reach 10000 (5000 * 2), multiply by 2 again
- repeat
from covasim.
as i mentioned in my comment on the PR we definitely don't want to let prevalence reach 50% -- maybe not even 5% -- before rescaling
from covasim.
I've set it up to 5% and it's configurable, we can experiment with even lower thresholds if need be
from covasim.
How do you make transmission trees when you have dynamic rescaling of the population?
from covasim.
you wouldn't be able to use transmission trees with this -- assuming you probably wouldn't be doing a full transmission tree for >1m infections
from covasim.
Related Issues (20)
- bug within the analysis.py (not able to pass **kwargs) HOT 2
- Error in cv.make_synthpop HOT 2
- Faulty error message: rel_imm_variant is not a valid key HOT 2
- Set vaccine efficacy via vaccinate_num() HOT 1
- Analyzer and sim.compute_fit() give different `n_dead` HOT 1
- Hanging comma on `plots` value in defaults.get_default_plots() causes `sim.plot(to_plot='seir')` to fail HOT 1
- FAQ: Counting tests, diagnoses & infections?
- Release log date bug HOT 1
- No impact from changing the βnab_effβ parameter HOT 1
- Covasim tutorials on Binder fail on sciris import HOT 2
- The copyright footer needs to be updated to MIT
- Not all agents are present in household layer in a hybrid population HOT 5
- Best way to use decision making models for each person in a population HOT 1
- Interaction between the pop_scale, pop_infected, and rescale parameters
- how to load custom location.json generated by SynthPops? HOT 1
- Bug in tut_intro.ipynb when calling cv.MultiSim HOT 2
- Contact between identical agentid? HOT 2
- covasim - local doc build failing (make html) HOT 6
- Economics / Costing Analysis
- The footer.html customization isn't being applied in the Sphinx PyData theme HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from covasim.