Low Birth Weight and Short Gestation
Low birth weight and short gestation (LBWSG) is a non-standard risk implementation that has been used in several public health models.
- class vivarium_public_health.risks.implementations.low_birth_weight_and_short_gestation.LBWSGDistribution(exposure_data=None)[source]
- Parameters:
exposure_data (DataFrame) –
- CONFIGURATION_DEFAULTS: Dict[str, Any] = {'lbwsg_distribution': {'age_column': 'age', 'sex_column': 'sex', 'year_column': 'year'}}
A dictionary containing the defaults for any configurations managed by this component. An empty dictionary indicates no managed configurations.
- 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
- get_category_intervals(builder)[source]
Gets the intervals for each category. It is a dictionary from the string “birth_weight” or “gestational_age” to a dictionary from the category name to the interval :param builder: :return:
- ppf(propensities)[source]
Takes a DataFrame with three columns: ‘categorical.propensity’, ‘birth_weight.propensity’, and ‘gestational_age.propensity’ which contain each of those propensities for each simulant.
Returns a DataFrame with two columns for birth-weight and gestational age exposures.
- single_axis_ppf(axis, propensity, categorical_propensity=None, categorical_exposure=None)[source]
Takes an axis (either ‘birth_weight’ or ‘gestational_age’), a propensity and either a categorical propensity or a categorical exposure and returns continuous exposures for that axis.
If categorical propensity is provided rather than exposure, this function requires access to the low birth weight and short gestation categorical exposure parameters pipeline (“risk_factor.low_birth_weight_and_short_gestation.exposure_parameters”).
- class vivarium_public_health.risks.implementations.low_birth_weight_and_short_gestation.LBWSGRisk[source]
- AXES = ['birth_weight', 'gestational_age']
- 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]
- 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.implementations.low_birth_weight_and_short_gestation.LBWSGRiskEffect(target)[source]
- Parameters:
target (str) –
- 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 columns_required: List[str] | None
Provides names of columns required by the component.
- Returns:
Names of required columns not created by this component. An empty list means all available columns are needed. None means no additional columns are necessary.
- Return type:
Optional[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
- get_relative_risk_source(builder)[source]
Get the relative risk source for this risk effect model.
- Parameters:
builder (Builder) – Interface to access simulation managers.
- Returns:
A lookup table containing the relative risk data for this risk effect model.
- Return type:
LookupTable
- get_population_attributable_fraction_source(builder)[source]
Get the population attributable fraction source for this risk effect model.
- Parameters:
builder (Builder) – Interface to access simulation managers.
- Returns:
A lookup table containing the population attributable fraction data for this risk effect model.
- Return type:
LookupTable
- 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