ModelSIR#
- class epiworldpy.epimodels.ModelSIR(self: epiworldpy._core.epimodels.ModelSIR, name: str, prevalence: SupportsFloat | SupportsIndex, transmission_rate: SupportsFloat | SupportsIndex, recovery_rate: SupportsFloat | SupportsIndex)#
Bases:
ModelSusceptible-Infected-Recovered (SIR) model on a network.
States:
Susceptible,Infected,Recovered.The model has no agents until a population is added, for example with
agents_smallworld().Examples
>>> from epiworldpy import epimodels >>> covid = epimodels.ModelSIR("COVID-19", prevalence=0.01, ... transmission_rate=0.9, recovery_rate=0.1) >>> covid.agents_smallworld(n=1000, k=5, d=False, p=0.01) >>> covid.run(ndays=100, seed=1912)
Create a SIR model.
- Parameters:
name (str) – Name of the virus.
prevalence (float) – Initial proportion of agents with the virus.
transmission_rate (float) – Probability of transmission per contact, between 0 and 1.
recovery_rate (float) – Daily probability of recovery, between 0 and 1.