metasyn.distribution.normal.DiscreteNormalDistribution

class metasyn.distribution.normal.DiscreteNormalDistribution(mean, sd)

Normal discrete distribution.

This class implements the normal/gaussian distribution and takes the average and standard deviation as initialization input.

Parameters:
  • mean (float) – Mean of the normal distribution.

  • sd (float) – Standard deviation of the normal distribution.

Examples

>>> DiscreteNormalDistribution(mean=2.4, sd=1.2)
name

core.normal

unique

False

version

1.0

var_type

discrete

__init__(mean, sd)
Parameters:
  • mean (float)

  • sd (float)

Methods

__init__(mean, sd)

default_distribution([var_type])

Get a distribution with default parameters.

draw()

Draw a random element from the fitted distribution.

draw_list(n)

Draw a list of values from the distribution.

draw_reset()

Reset the drawing of elements to start again.

from_dict(dist_dict)

Create a distribution from a dictionary.

information_criterion(values)

Get the BIC value for a particular set of values.

matches_name(name)

Check whether the name matches the distribution.

provides_var_type(var_type)

schema()

Create sub-schema to validate GMF file.

to_dict()

Convert the distribution to a dictionary.

Attributes

n_par

Number of parameters for distribution.

name

The identifier for the implemented distribution

scipy_class

unique

Whether the distribution creates only unique values

var_type

The variable type of the distribution

version

Version of the implemented distribution