gnome.utilities.distributions¶
Classes that generate various types of probability distributions
Attributes¶
Classes¶
Base class for distributions, just to make it easier to know |
|
Base class for distributions, just to make it easier to know |
|
Base class for distributions, just to make it easier to know |
|
Base class for distributions, just to make it easier to know |
|
Base class for distributions, just to make it easier to know |
|
Functions¶
|
Return a distribution object corresponding to its name |
Module Contents¶
- gnome.utilities.distributions.get_distribution_by_name(dist_name)¶
Return a distribution object corresponding to its name
note: this isn’t really helpful until / unless we standardize the initialization interface.
- class gnome.utilities.distributions.DistributionBase(name=None, _appearance=None, *args, **kwargs)¶
Bases:
gnome.gnomeobject.GnomeId
Base class for distributions, just to make it easier to know what is a distribution class
At them moment, all they need is a set_values method
NOTE: if possible, it would be good to have the same interface to all distributions. For example, see: the distributions in numpy.random. for example:
random.normal(loc=0.0, scale=1.0, size=None)
all distribution have a location and a scale, which have different meanings depending on the distribution.
- abstract set_values(np_array)¶
- class gnome.utilities.distributions.UniformDistribution(low=0.0, high=0.1, **kwargs)¶
Bases:
DistributionBase
Base class for distributions, just to make it easier to know what is a distribution class
At them moment, all they need is a set_values method
NOTE: if possible, it would be good to have the same interface to all distributions. For example, see: the distributions in numpy.random. for example:
random.normal(loc=0.0, scale=1.0, size=None)
all distribution have a location and a scale, which have different meanings depending on the distribution.
- Parameters:
low – For the Uniform distribution, it is lower bound.
high – For the Uniform distribution, it is upper bound.
- low = 0.0¶
- high = 0.1¶
- set_values(np_array)¶
- class gnome.utilities.distributions.NormalDistribution(mean=0.0, sigma=0.1, **kwargs)¶
Bases:
DistributionBase
Base class for distributions, just to make it easier to know what is a distribution class
At them moment, all they need is a set_values method
NOTE: if possible, it would be good to have the same interface to all distributions. For example, see: the distributions in numpy.random. for example:
random.normal(loc=0.0, scale=1.0, size=None)
all distribution have a location and a scale, which have different meanings depending on the distribution.
- Parameters:
mean – The mean of the normal distribution
sigma – The standard deviation of normal distribution
- mean = 0.0¶
- sigma = 0.1¶
- set_values(np_array)¶
- class gnome.utilities.distributions.LogNormalDistribution(mean=0.0, sigma=0.1, **kwargs)¶
Bases:
DistributionBase
Base class for distributions, just to make it easier to know what is a distribution class
At them moment, all they need is a set_values method
NOTE: if possible, it would be good to have the same interface to all distributions. For example, see: the distributions in numpy.random. for example:
random.normal(loc=0.0, scale=1.0, size=None)
all distribution have a location and a scale, which have different meanings depending on the distribution.
- Parameters:
mean – The mean of the normal distribution
sigma – The standard deviation of normal distribution
- mean = 0.0¶
- sigma = 0.1¶
- set_values(np_array)¶
- class gnome.utilities.distributions.WeibullDistribution(alpha=None, lambda_=1.0, min_=None, max_=None, **kwargs)¶
Bases:
DistributionBase
Base class for distributions, just to make it easier to know what is a distribution class
At them moment, all they need is a set_values method
NOTE: if possible, it would be good to have the same interface to all distributions. For example, see: the distributions in numpy.random. for example:
random.normal(loc=0.0, scale=1.0, size=None)
all distribution have a location and a scale, which have different meanings depending on the distribution.
- Parameters:
alpha – The shape parameter ‘alpha’ - labeled as ‘a’ in numpy.random.weibull distribution
lambda – The scale parameter for the distribution - required for 2-parameter weibull distribution (Rosin-Rammler).
- NOTE: underscore names because min, max, and lambda are Python
builtins
- alpha = None¶
- lambda_ = 1.0¶
- min_ = None¶
- max_ = None¶
- set_values(np_array)¶
- class gnome.utilities.distributions.RayleighDistribution¶
- classmethod sigma_from_wind(avg_speed)¶
- classmethod pdf(x, sigma)¶
- classmethod cdf(x, sigma)¶
- classmethod quantile(f, sigma)¶
- gnome.utilities.distributions.ALL_DISTS¶