Risk Exposure Distribution Models
This module contains tools for modeling several different risk exposure distributions.
- class vivarium_public_health.risks.distributions.SimulationDistribution(risk)[source]
Wrapper around a variety of distribution implementations.
- Parameters:
risk (str) –
- setup(builder)[source]
Defines custom actions this component needs to run during the setup lifecycle phase.
This method is intended to be overridden by subclasses to perform any necessary setup operations specific to the component. By default, it does nothing.
- Parameters:
builder (Builder) – The builder object used to set up the component.
- Return type:
None
- class vivarium_public_health.risks.distributions.EnsembleSimulation(risk, weights, mean, sd)[source]
- property columns_created: List[str]
Provides names of columns created by the component.
- Returns:
Names of the columns created by this component, or an empty list if none.
- Return type:
List[str]
- property initialization_requirements: Dict[str, List[str]]
Provides the names of all values required by this component during simulant initialization.
- setup(builder)[source]
Defines custom actions this component needs to run during the setup lifecycle phase.
This method is intended to be overridden by subclasses to perform any necessary setup operations specific to the component. By default, it does nothing.
- Parameters:
builder (Builder) – The builder object used to set up the component.
- Return type:
None
- on_initialize_simulants(pop_data)[source]
Method that vivarium will run during simulant initialization.
This method is intended to be overridden by subclasses if there are operations they need to perform specifically during the simulant initialization phase.
- Parameters:
pop_data (SimulantData) – The data associated with the simulants being initialized.
- Return type:
None
- class vivarium_public_health.risks.distributions.ContinuousDistribution(risk, mean, sd, distribution=None)[source]
- setup(builder)[source]
Defines custom actions this component needs to run during the setup lifecycle phase.
This method is intended to be overridden by subclasses to perform any necessary setup operations specific to the component. By default, it does nothing.
- Parameters:
builder (Builder) – The builder object used to set up the component.
- Return type:
None
- class vivarium_public_health.risks.distributions.PolytomousDistribution(risk, exposure_data)[source]
-
- setup(builder)[source]
Defines custom actions this component needs to run during the setup lifecycle phase.
This method is intended to be overridden by subclasses to perform any necessary setup operations specific to the component. By default, it does nothing.
- Parameters:
builder (Builder) – The builder object used to set up the component.
- Return type:
None
- class vivarium_public_health.risks.distributions.DichotomousDistribution(risk, exposure_data)[source]
-
- setup(builder)[source]
Defines custom actions this component needs to run during the setup lifecycle phase.
This method is intended to be overridden by subclasses to perform any necessary setup operations specific to the component. By default, it does nothing.
- Parameters:
builder (Builder) – The builder object used to set up the component.
- Return type:
None
- vivarium_public_health.risks.distributions.get_distribution(risk, distribution_type, exposure, exposure_standard_deviation, weights)[source]
- vivarium_public_health.risks.distributions.clip(q)[source]
Adjust the percentile boundary casses.
The risk distributions package uses the 99.9th and 0.001st percentiles of a log-normal distribution as the bounds of the distribution support. This is bound up in the GBD risk factor PAF calculation process. We’ll clip the distribution tails so we don’t get NaNs back from the distribution calls