gluonts.dataset.split package#

class gluonts.dataset.split.DateSplitter(*, prediction_length: int, split_date: pandas._libs.tslibs.period.Period, max_history: Optional[int] = None)[source]#

Bases: gluonts.dataset.split.splitter.AbstractBaseSplitter, pydantic.main.BaseModel

A splitter that slices training and test data based on a pandas.Period.

Training entries obtained from this class will be limited to observations up to (including) the given split_date.

Parameters
  • prediction_length (int) – Length of the prediction interval in test data.

  • split_date (pandas._libs.tslibs.period.Period) – Period determining where the training data ends. Please make sure at least prediction_length (for rolling_split multiple of prediction_length) values are left over after the split_date.

  • max_history (Optional[int]) – If given, all entries in the test-set have a max-length of max_history. This can be used to produce smaller file-sizes.

class Config[source]#

Bases: object

arbitrary_types_allowed = True#
max_history: Optional[int]#
prediction_length: int#
split_date: pandas._libs.tslibs.period.Period#
class gluonts.dataset.split.OffsetSplitter(*, prediction_length: int, split_offset: int, max_history: Optional[int] = None)[source]#

Bases: pydantic.main.BaseModel, gluonts.dataset.split.splitter.AbstractBaseSplitter

A splitter that slices training and test data based on a fixed integer offset.

Parameters
  • prediction_length (int) – Length of the prediction interval in test data.

  • split_offset (int) – Offset determining where the training data ends. A positive offset indicates how many observations since the start of each series should be in the training slice; a negative offset indicates how many observations before the end of each series should be excluded from the training slice. Please make sure that the number of excluded values is enough for the test case, i.e., at least prediction_length (for rolling_split multiple of prediction_length) values are left off.

  • max_history (Optional[int]) – If given, all entries in the test-set have a max-length of max_history. This can be used to produce smaller file-sizes.

max_history: Optional[int]#
prediction_length: int#
split_offset: int#