Skip to content

laser.measles.components.base_infection

laser.measles.components.base_infection

laser.measles.components.base_infection.BaseInfectionParams

Bases: BaseModel

Parameters specific to the infection process component.

Example:

1
2
3
4
5
```python
from laser.measles.biweekly.components.process_infection import InfectionParams

params = InfectionParams(beta=0.57, seasonality=0.2)
```

laser.measles.components.base_infection.BaseInfectionProcess(model, verbose=False, params=None)

Bases: BasePhase, ABC

Base class for infection (transmission and disease progression).

Example:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
```python
from laser.measles.scenarios.synthetic import single_patch_scenario
from laser.measles.biweekly import BiweeklyModel, BiweeklyParams
from laser.measles.biweekly import components
from laser.measles import create_component

scenario = single_patch_scenario(population=100_000, mcv1_coverage=0.85)
params = BiweeklyParams(num_ticks=52, seed=42, start_time="2000-01")
model = BiweeklyModel(scenario, params)
model.add_component(create_component(components.InfectionProcess, components.InfectionParams(beta=0.57)))
```