DemonstrationTimeSeriesLoader

class dtaianomaly.data.DemonstrationTimeSeriesLoader(do_caching: bool = False)[source]

A data loader object to load the demonstration time series.

The demonstration time series loader is a simple time series which typically follows a sine-wave of length 1400 containing approximately 12 periods. The time series generally follows the typical sine-pattern (including some Gaussian noise), the valley around observation 950 is slightly deeper than the other valleys in the time series, leading to an anomaly.

Parameters:
do_cachingbool, default=False

Whether to cache the loaded data or not.

Examples

>>> from dtaianomaly.data import DemonstrationTimeSeriesLoader
>>> data_set = DemonstrationTimeSeriesLoader().load()
>>> X = data_set.X_test
>>> y = data_set.y_test
load() DataSet

Load the time series.

Load the dataset. If do_caching==True, the loaded will be saved in the cache if no cache is available yet, and the cached data will be returned.

Returns:
DataSet

The loaded dataset.