epipylib.model package¶
The model package is a collection of epidemic models.
SIR¶
The (S)usceptible (I)nfected (R)ecovered Model.
-
epipylib.model.sir.
init_model
(N, y0)¶ Initialize the SIR model.
Parameters: - y0 (int) – Infected rate at initial time step.
- N (int) – Population
Returns: Model at initial time step
Return type: tuple(int, int, int)
-
epipylib.model.sir.
simple
(y, x, N, beta, gamma)¶ Defines the SIR simple model.
Parameters: - y (array) – Individuals at time step x
- x (array) – Time step
- N (int) – Population
- beta (float) – The parameter controlling how often a susceptible-infected contact results in a new infection.
- gamma (float) – The rate an infected recovers and moves into the resistant phase.
Returns: S, I, R at time step n
Return type: tuple(int/float, int/float, int/float)
-
epipylib.model.sir.
vaccine
(y, x, N, beta, gamma, nu)¶ Defines the SIR vaccine model.
Parameters: - y (array) – Individuals at time step x
- x (array) – Time step
- N (int) – Population
- beta (float) – The parameter controlling how often a susceptible-infected contact results in a new infection.
- gamma (float) – The rate an infected recovers and moves into the resistant phase.
- nu (float) – The rate at which susceptible become vaccinated.
Returns: S, I, R at time step n
Return type: tuple(int/float, int/float, int/float)
-
epipylib.model.sir.
wbad
(y, x, N, beta, gamma, mu)¶ Defines the SIR with births and deaths model.
Parameters: - y (array) – Individuals at time step x
- x (array) – Time step
- N (int) – Population
- beta (float) – The parameter controlling how often a susceptible-infected contact results in a new infection.
- gamma (float) – The rate an infected recovers and moves into the resistant phase.
- mu (float) – The parameter represents the average death rate
Returns: S, I, R at time step n
Return type: tuple(int/float, int/float, int/float)
SIRS¶
The (S)usceptible (I)nfected (R)ecovered (S)usceptible Model.
-
epipylib.model.sirs.
init_model
(N, y0)¶ Initialize the SIRS model.
Parameters: - y0 (int) – Infected rate at initial time step.
- N (int) – Population
Returns: Model at initial time step
Return type: tuple(int, int, int)
-
epipylib.model.sirs.
simple
(y, x, N, beta, gamma, mu)¶ Defines the SIRS simple model.
Parameters: - y (array) – Individuals at time step x
- x (array) – Time step
- N (int) – Population
- beta (float) – The parameter controlling how often a susceptible-infected contact results in a new infection.
- gamma (float) – The rate an infected recovers and moves into the resistant phase.
- mu (float) – The parameter represents the average death rate
Returns: S, I, R at time step n
Return type: tuple(int/float, int/float, int/float)
-
epipylib.model.sirs.
wbad
(y, x, N, beta, gamma, mu, f)¶ Defines the SIRS with births and deaths Model
Parameters: - y (array) – Individuals at time step x
- x (array) – Time step
- N (int) – Population
- beta (float) – The parameter controlling how often a susceptible-infected contact results in a new infection.
- gamma (float) – The rate an infected recovers and moves into the resistant phase.
- mu (float) – The parameter represents the average death rate
- f (float) – The parameter represents the average loss of immunity rate of recovered individuals
Returns: S, I, R at time step n
Return type: tuple(int/float, int/float, int/float)
SEIR¶
The (S)usceptible (E)xposed (I)nfected (R)ecovered Model.
-
epipylib.model.seir.
init_model
(N, y0)¶ Initialize the SEIR model.
Parameters: - y0 (int) – Infected rate at initial time step.
- N (int) – Population
Returns: Model at initial time step
Return type: tuple(int, int, int)
-
epipylib.model.seir.
simple
(y, x, N, beta, gamma, sigma, mu)¶ Defines the SEIR simple model.
Parameters: - y (array) – Individuals at time step x
- x (array) – Time step
- N (int) – Population
- beta (float) – The parameter controlling how often a susceptible-infected contact results in a new infection.
- gamma (float) – The rate an infected recovers and moves into the resistant phase.
- sigma (float) – The rate at which an exposed person becomes infective.
- mu (float) – The parameter represents the average death rate
Returns: S, E, I, R at time step n
Return type: tuple(int/float, int/float, int/float)