metasyn.distribution.constant.DiscreteConstantDistribution
- class metasyn.distribution.constant.DiscreteConstantDistribution(value)
Constant discrete distribution.
This class implements the constant distribution, so that it draws always the same value.
- Parameters:
value (int) – Value that will be returned when drawn.
Examples
>>> DiscreteConstantDistribution(213456)
- name
core.constant
- unique
False
- version
1.0
- var_type
discrete
- __init__(value)
- Return type:
None
Methods
__init__(value)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
The identifier for the implemented distribution
Whether the distribution creates only unique values
The variable type of the distribution
Version of the implemented distribution