Coder Social home page Coder Social logo

Comments (11)

inc0 avatar inc0 commented on August 12, 2024 1

Right, this is mainly to produce numbers per day for big populations, probably good to document when not to use dynamic resampling

from covasim.

ckerr-IDM avatar ckerr-IDM commented on August 12, 2024

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.

inc0 avatar inc0 commented on August 12, 2024

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:

  1. De-infect random 50% of infected
  2. Resurrect 50% of dead
  3. Re-susceptible(?) 50% of recovered
  4. Multiply every summary stat by 2

from covasim.

cliffckerr avatar cliffckerr commented on August 12, 2024

@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.

dlchao avatar dlchao commented on August 12, 2024

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.

ckerr-IDM avatar ckerr-IDM commented on August 12, 2024

@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.

inc0 avatar inc0 commented on August 12, 2024

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.

ckerr-IDM avatar ckerr-IDM commented on August 12, 2024

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.

inc0 avatar inc0 commented on August 12, 2024

I've set it up to 5% and it's configurable, we can experiment with even lower thresholds if need be

from covasim.

dlchao avatar dlchao commented on August 12, 2024

How do you make transmission trees when you have dynamic rescaling of the population?

from covasim.

ckerr-IDM avatar ckerr-IDM commented on August 12, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.