edo.distributions package¶
Submodules¶
edo.distributions.base module¶
The base class from which all distributions inherit.
edo.distributions.continuous module¶
All currently implemented continuous distributions.
-
class
edo.distributions.continuous.
Gamma
(random_state)[source]¶ Bases:
edo.distributions.base.Distribution
The gamma distribution class.
- Parameters
- random_statenumpy.random.RandomState
The PRNG used to sample instance parameters from
param_limits
.
- Attributes
- namestr
Name of the distribution,
"Gamma"
.dtype
floatConvert a string or number to a floating point number, if possible.
- param_limitsdict
A dictionary of limits on the distribution parameters. Defaults to
[0, 10]
for bothalpha
andtheta
.- alphafloat
The shape parameter sampled from
param_limits["alpha"]
. Instance attribute.- thetafloat
The scale parameter sampled from
param_limits["theta"]
. Instance attribute.
-
hard_limits
= {'alpha': [0, 10], 'theta': [0, 10]}¶
-
name
= 'Gamma'¶
-
param_limits
= {'alpha': [0, 10], 'theta': [0, 10]}¶
-
class
edo.distributions.continuous.
Normal
(random_state)[source]¶ Bases:
edo.distributions.base.Distribution
The normal distribution class.
- Parameters
- random_statenumpy.random.RandomState
The PRNG used to sample instance parameters from
param_limits
.
- Attributes
- namestr
Name of the distribution,
"Normal"
.dtype
floatConvert a string or number to a floating point number, if possible.
- param_limitsdict
A dictionary of limits on the distribution parameters. Defaults to
[-10, 10]
formean
and[0, 10]
forstd
.- meanfloat”
The mean, sampled from
param_limits["mean"]
. Instance attribute.- stdfloat
The standard deviation, sampled from
param_limits["std"]
. Instance attribute.
-
hard_limits
= {'mean': [-10, 10], 'std': [0, 10]}¶
-
name
= 'Normal'¶
-
param_limits
= {'mean': [-10, 10], 'std': [0, 10]}¶
-
class
edo.distributions.continuous.
Uniform
(random_state)[source]¶ Bases:
edo.distributions.base.Distribution
The uniform distribution class.
- Parameters
- random_statenumpy.random.RandomState
The PRNG used to sample instance parameters from
param_limits
.
- Attributes
- namestr
Name of the distribution,
Uniform
.dtype
floatConvert a string or number to a floating point number, if possible.
- param_limitsdict
A dictionary of limits on the distribution parameters. Defaults to
[-10, 10]
forbounds
.- boundslist of float
The lower and upper bounds of the distribution. Instance attribute.
-
hard_limits
= {'bounds': [-10, 10]}¶
-
name
= 'Uniform'¶
-
param_limits
= {'bounds': [-10, 10]}¶
edo.distributions.discrete module¶
All currently implemented discrete distribution classes.
-
class
edo.distributions.discrete.
Bernoulli
(random_state)[source]¶ Bases:
edo.distributions.base.Distribution
The Bernoulli distribution class, i.e. a binomial distribution with exactly one trial.
- Parameters
- random_statenumpy.random.RandomState
The PRNG used to sample instance parameters from
param_limits
.
- Attributes
- namestr
Name of the distribution,
"Bernoulli"
.dtype
intint([x]) -> integer
- param_limitsdict
A dictionary of the limits on the distribution parameter. Defaults to
[0, 1]
forprob
.- probfloat
The success probability, sampled from
param_limits["prob"]
. Instance attribute.
-
hard_limits
= {'prob': [0, 1]}¶
-
name
= 'Bernoulli'¶
-
param_limits
= {'prob': [0, 1]}¶
-
class
edo.distributions.discrete.
Poisson
(random_state)[source]¶ Bases:
edo.distributions.base.Distribution
The Poisson distribution class.
- Parameters
- random_statenumpy.random.RandomState
The PRNG used to sample instance parameters from
param_limits
.
- Attributes
- namestr
Name of distribution,
"Poisson"
.dtype
intint([x]) -> integer
- param_limitsdict
A dictionary of the limits of the distribution parameter. Defaults to
[0, 10]
forlam
.- lamfloat
The rate parameter, sampled from
param_limits["lam"]
. Instance attribute.
-
hard_limits
= {'lam': [0, 10]}¶
-
name
= 'Poisson'¶
-
param_limits
= {'lam': [0, 10]}¶
Module contents¶
Top-level imports for the edo.distributions subpackage.
-
class
edo.distributions.
Bernoulli
(random_state)[source]¶ Bases:
edo.distributions.base.Distribution
The Bernoulli distribution class, i.e. a binomial distribution with exactly one trial.
- Parameters
- random_statenumpy.random.RandomState
The PRNG used to sample instance parameters from
param_limits
.
- Attributes
- namestr
Name of the distribution,
"Bernoulli"
.dtype
intint([x]) -> integer
- param_limitsdict
A dictionary of the limits on the distribution parameter. Defaults to
[0, 1]
forprob
.- probfloat
The success probability, sampled from
param_limits["prob"]
. Instance attribute.
-
hard_limits
= {'prob': [0, 1]}¶
-
name
= 'Bernoulli'¶
-
param_limits
= {'prob': [0, 1]}¶
-
class
edo.distributions.
Distribution
[source]¶ Bases:
object
An abstract base class for all currently implemented distributions and those defined by users.
-
class
edo.distributions.
Gamma
(random_state)[source]¶ Bases:
edo.distributions.base.Distribution
The gamma distribution class.
- Parameters
- random_statenumpy.random.RandomState
The PRNG used to sample instance parameters from
param_limits
.
- Attributes
- namestr
Name of the distribution,
"Gamma"
.dtype
floatConvert a string or number to a floating point number, if possible.
- param_limitsdict
A dictionary of limits on the distribution parameters. Defaults to
[0, 10]
for bothalpha
andtheta
.- alphafloat
The shape parameter sampled from
param_limits["alpha"]
. Instance attribute.- thetafloat
The scale parameter sampled from
param_limits["theta"]
. Instance attribute.
-
hard_limits
= {'alpha': [0, 10], 'theta': [0, 10]}¶
-
name
= 'Gamma'¶
-
param_limits
= {'alpha': [0, 10], 'theta': [0, 10]}¶
-
class
edo.distributions.
Normal
(random_state)[source]¶ Bases:
edo.distributions.base.Distribution
The normal distribution class.
- Parameters
- random_statenumpy.random.RandomState
The PRNG used to sample instance parameters from
param_limits
.
- Attributes
- namestr
Name of the distribution,
"Normal"
.dtype
floatConvert a string or number to a floating point number, if possible.
- param_limitsdict
A dictionary of limits on the distribution parameters. Defaults to
[-10, 10]
formean
and[0, 10]
forstd
.- meanfloat”
The mean, sampled from
param_limits["mean"]
. Instance attribute.- stdfloat
The standard deviation, sampled from
param_limits["std"]
. Instance attribute.
-
hard_limits
= {'mean': [-10, 10], 'std': [0, 10]}¶
-
name
= 'Normal'¶
-
param_limits
= {'mean': [-10, 10], 'std': [0, 10]}¶
-
class
edo.distributions.
Poisson
(random_state)[source]¶ Bases:
edo.distributions.base.Distribution
The Poisson distribution class.
- Parameters
- random_statenumpy.random.RandomState
The PRNG used to sample instance parameters from
param_limits
.
- Attributes
- namestr
Name of distribution,
"Poisson"
.dtype
intint([x]) -> integer
- param_limitsdict
A dictionary of the limits of the distribution parameter. Defaults to
[0, 10]
forlam
.- lamfloat
The rate parameter, sampled from
param_limits["lam"]
. Instance attribute.
-
hard_limits
= {'lam': [0, 10]}¶
-
name
= 'Poisson'¶
-
param_limits
= {'lam': [0, 10]}¶
-
class
edo.distributions.
Uniform
(random_state)[source]¶ Bases:
edo.distributions.base.Distribution
The uniform distribution class.
- Parameters
- random_statenumpy.random.RandomState
The PRNG used to sample instance parameters from
param_limits
.
- Attributes
- namestr
Name of the distribution,
Uniform
.dtype
floatConvert a string or number to a floating point number, if possible.
- param_limitsdict
A dictionary of limits on the distribution parameters. Defaults to
[-10, 10]
forbounds
.- boundslist of float
The lower and upper bounds of the distribution. Instance attribute.
-
hard_limits
= {'bounds': [-10, 10]}¶
-
name
= 'Uniform'¶
-
param_limits
= {'bounds': [-10, 10]}¶