gluonts.dataset.stat module

class gluonts.dataset.stat.DatasetStatistics[source]

Bases: tuple

A NamedTuple to store the statistics of a Dataset.

property feat_static_cat

Alias for field number 7

property feat_static_real

Alias for field number 6

property integer_dataset

Alias for field number 0

property max_target

Alias for field number 1

property mean_abs_target

Alias for field number 2

property mean_target

Alias for field number 3

property mean_target_length

Alias for field number 4

property min_target

Alias for field number 5

property num_feat_dynamic_cat

Alias for field number 9

property num_feat_dynamic_real

Alias for field number 8

property num_missing_values

Alias for field number 10

property num_time_observations

Alias for field number 11

property num_time_series

Alias for field number 12

property scale_histogram

Alias for field number 13

class gluonts.dataset.stat.ScaleHistogram(base: float = 2.0, bin_counts: Optional[dict] = None, empty_target_count: int = 0)[source]

Bases: object

Scale histogram of a timeseries dataset

This counts the number of timeseries whose mean of absolute values is in the [base ** i, base ** (i+1)] range for all possible i. The number of entries with empty target is counted separately.

Parameters
  • base – Log-width of the histogram’s buckets.

  • bin_counts

  • empty_target_count

add(target_values)[source]
bucket_index(target_values)[source]
count(target)[source]
gluonts.dataset.stat.calculate_dataset_statistics(ts_dataset: Any) → gluonts.dataset.stat.DatasetStatistics[source]

Computes the statistics of a given Dataset.

Parameters

ts_dataset – Dataset of which to compute the statistics.

Returns

NamedTuple containing the statistics.

Return type

DatasetStatistics