metasyn.distribution.uniform.DateUniformDistribution

class metasyn.distribution.uniform.DateUniformDistribution(lower, upper)

Uniform date distribution.

Date objects will be uniformly distributed between a start and end date.

Parameters:
  • lower (str or datetime.date) – Earliest possible date to be generated from this distribution. String formatted in ISO format, see examples below or use date objects from the python standard library datetime.

  • upper (str or datetime.date) – Latest possible date to be generated from this distribution. String formatted in ISO format, see examples below or use date objects from the python standard library datetime.

Examples

>>> DateUniformDistribution(lower="10:39:12", upper="10:39:45", precision="seconds")
name

core.uniform

unique

False

version

1.0

var_type

date

__init__(lower, upper)
Parameters:
  • lower (Any)

  • upper (Any)

Methods

__init__(lower, upper)

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.

fromisoformat(dt_obj)

Convert string to iso format.

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)

round(time_obj)

Round down any time object with the precision.

schema()

Create sub-schema to validate GMF file.

to_dict()

Convert the distribution to a dictionary.

Attributes

minimum_delta

Get the minimum time delta.

name

The identifier for the implemented distribution

precision_possibilities

unique

Whether the distribution creates only unique values

var_type

The variable type of the distribution

version

Version of the implemented distribution