gaussian_distribution
GaussianDistribution
Bases: BaseDistribution
This class represents a Gaussian distribution, a type of statistical distribution where the values are distributed symmetrically around the mean. A Gaussian distribution is defined by two parameters: the mean and the standard deviation.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
mean
|
float
|
|
required |
std_dev
|
float
|
|
required |
Raises:
| Type | Description |
|---|---|
ValueError
|
If 'mean' argument is negative or 'std_dev' argument is not positive. |
Example
Create a GaussianDistribution object.
gd = GaussianDistribution(0, 1)
The mean and std_dev attributes can be accessed and updated.
gd.mean 0 gd.std_dev 1 gd.mean = 5 gd.mean 5
Source code in emod_api/utils/distributions/gaussian_distribution.py
get_demographic_distribution_parameters()
Yield the flag and relevant values necessary for setting a demographics gaussian distribution
Returns:
| Type | Description |
|---|---|
dict
|
a dict of the form: {'flag': X, 'value1': Y, 'value2': Z} |
Source code in emod_api/utils/distributions/gaussian_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 |