Skip to content

laser.measles.components.base_tracker_fadeout

laser.measles.components.base_tracker_fadeout

FadeOutTracker component for tracking the number of nodes with fade-outs.

This module provides a component that monitors and records the number of nodes that have experienced fade-outs (state transitions to 0) at each time tick in the simulation. The tracker maintains a time series of fade-out counts that can be used for analysis and visualization of the model's behavior over time.

laser.measles.components.base_tracker_fadeout.BaseFadeOutTracker(model, verbose=False)

Bases: BasePhase

A phase that tracks and records the number of nodes experiencing fade-outs over time.

This component maintains a time series of fade-out counts by monitoring the number of nodes that have transitioned to state 0 at each simulation tick. The data can be used for analyzing the temporal dynamics of fade-outs in the network.

Attributes:

Name Type Description
fade_out_tracker ndarray

An array of length nticks that stores the count of nodes in state 0 at each time tick.

Parameters:

Name Type Description Default
model

The simulation model instance.

required
verbose bool

Whether to enable verbose logging. Defaults to False.

False

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.FadeOutTracker, components.FadeOutTrackerParams()))
```

laser.measles.components.base_tracker_fadeout.BaseFadeOutTracker.initialize(model)

No-op — fade-out tracking requires no additional setup.

laser.measles.components.base_tracker_fadeout.BaseFadeOutTrackerParams

Bases: BaseModel

Parameters for the FadeOutTracker component.

Example:

1
2
3
4
5
```python
from laser.measles.biweekly.components.tracker_fadeout import FadeOutTrackerParams

params = FadeOutTrackerParams()
```