timesead.data.smd_dataset ========================= .. py:module:: timesead.data.smd_dataset Attributes ---------- .. autoapisummary:: timesead.data.smd_dataset.FILENAMES timesead.data.smd_dataset.TRAIN_LENS timesead.data.smd_dataset.TEST_LENS Classes ------- .. autoapisummary:: timesead.data.smd_dataset.SMDDataset Module Contents --------------- .. py:data:: FILENAMES :value: ['machine-1-1.txt', 'machine-1-2.txt', 'machine-1-3.txt', 'machine-1-4.txt', 'machine-1-5.txt',... .. py:data:: TRAIN_LENS :value: [28479, 23694, 23702, 23706, 23705, 23688, 23697, 23698, 23693, 23699, 23688, 23689, 23688,... .. py:data:: TEST_LENS :value: [28479, 23694, 23703, 23707, 23706, 23689, 23697, 23699, 23694, 23700, 23689, 23689, 23689,... .. py:class:: SMDDataset(server_id: int, path: str = os.path.join(DATA_DIRECTORY, 'smd'), training: bool = True, standardize: Union[bool, Callable] = True, download: bool = True, preprocess: bool = True) Bases: :py:obj:`timesead.data.dataset.BaseTSDataset` Implementation of the Server Machine Dataset [Su2019]_. The data consists of traces from 28 different servers recorded over several weeks. We consider each trace to be a separate dataset. .. note:: Automatically downloading the dataset currently requires that you have `git` installed on your system! .. [Su2019] Y. Su, Y. Zhao, C. Niu, R. Liu, W. Sun, D. Pei. Robust anomaly detection for multivariate time series through stochastic recurrent neural network. In: Proceedings of the 25th ACM SIGKDD international conference on knowledge discovery & data mining, 2019 Jul 25 (pp. 2828-2837). :param path: Folder from which to load the dataset. :param server_id: Data from which machine to load. Must be in [0, ..., 27]. :param training: Whether to load the training or the test set. :param standardize: Can be either a bool that decides whether to apply the dataset-dependent default standardization or a function with signature (dataframe, stats) -> dataframe, where stats is a dictionary of common statistics on the training dataset (i.e., mean, std, median, etc. for each feature) :param download: Whether to download the dataset if it doesn't exist. :param preprocess: Whether to setup the dataset for experiments. .. py:attribute:: GITHUB_LINK :value: 'https://github.com/NetManAIOps/OmniAnomaly.git' .. py:attribute:: server_id .. py:attribute:: path .. py:attribute:: processed_dir .. py:attribute:: training :value: True .. py:attribute:: standardize :value: True .. py:attribute:: inputs :value: None .. py:attribute:: targets :value: None .. py:method:: load_data() -> Tuple[numpy.ndarray, numpy.ndarray] .. py:method:: __getitem__(item: int) -> Tuple[Tuple[torch.Tensor], Tuple[torch.Tensor]] .. py:method:: __len__() -> Optional[int] .. py:property:: seq_len :type: Union[int, List[int]] .. py:property:: num_features :type: int .. py:method:: get_default_pipeline() -> Dict[str, Dict[str, Any]] :staticmethod: .. py:method:: get_feature_names() :staticmethod: .. py:method:: download()