log_normal_distribution
LogNormalDistribution
Bases: BaseDistribution
This class represents a log-normal distribution, a type of statistical distribution where the logarithm of the values is normally distributed. A log-normal distribution is defined by two parameters: the mean and the standard deviation.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
mean
|
float
|
|
required |
std_dev
|
float
|
|
required |
Example
Create a LogNormalDistribution object.
lnd = LogNormalDistribution(0, 1)
The mean and std_dev attributes can be accessed and updated.
lnd.mean 0 lnd.std_dev 1 lnd.mean = 5 lnd.mean 5
Source code in emod_api/utils/distributions/log_normal_distribution.py
get_demographic_distribution_parameters()
Yield the flag and relevant values necessary for setting a demographics log normal distribution
Returns:
| Type | Description |
|---|---|
dict
|
a dict of the form: {'flag': X, 'value1': Y, 'value2': Z} |
Source code in emod_api/utils/distributions/log_normal_distribution.py
set_intervention_distribution(intervention_object, prefix)
Set the distribution parameters to the object.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
intervention_object
|
ReadOnlyDict
|
|
required |
prefix
|
str
|
|
required |