timesead.data.smap_dataset
Attributes
Classes
Class that downloads and extracts the SMAP and MSL datasets [Hundman2018]. |
|
Implementation of the SMAP dataset [Hundman2018]. |
|
Implementation of the MSL dataset [Hundman2018]. |
Module Contents
- timesead.data.smap_dataset.DATASET_URL = 'https://s3-us-west-2.amazonaws.com/telemanom/data.zip'
- timesead.data.smap_dataset.LABELS_URL = 'https://raw.githubusercontent.com/khundman/telemanom/master/labeled_anomalies.csv'
- timesead.data.smap_dataset.BUFFER_SIZE = 16777216
- timesead.data.smap_dataset.ZIP_CHECKSUM = 'b4d66deb492d9b0a353b51879152687ed9313897e8e19320d2dc853d738ed8a7'
- timesead.data.smap_dataset.FILE_CHECKSUMS
- class timesead.data.smap_dataset.SMAPDownloader(data_path: str = os.path.join(DATA_DIRECTORY, 'smap'))
Class that downloads and extracts the SMAP and MSL datasets [Hundman2018]. Files are also checked for integrity against their SHA-256 hashes stored in data/SMAP/smap_checksums.json.
- Parameters:
data_path (str) – The folder in which to download the dataset.
- data_path
- static compute_sha256(file, buffer_size: int = BUFFER_SIZE) str
Compute the SHA-256 hash of a file object.
- check_existing_files() bool
Checks if all files specified in the FILE_CHECKSUMS json file are present and if their checksums are correct.
- Returns:
True if all files are present and their checksums are correct, False otherwise.
- Return type:
- static download_to_file(url: str, file, buffer_size: int = BUFFER_SIZE)
Download a file from any URL supported by urllib to a file object.
- download_data()
Download the SMAP and MSL datasets.
- class timesead.data.smap_dataset.SMAPDataset(data_path: str = os.path.join(DATA_DIRECTORY, 'smap'), channel_id: int = 0, training: bool = True, download: bool = True)
Bases:
_SMAPBaseDatasetImplementation of the SMAP dataset [Hundman2018]. It consists of several monitored values from a single satellite and commands sent to that satellite. We consider the trace for each channel a separate dataset, where the monitored value is in the first feature dimension and the remaining binary features correspond to the commands.
- Parameters:
- class timesead.data.smap_dataset.MSLDataset(data_path: str = os.path.join(DATA_DIRECTORY, 'smap'), channel_id: int = 0, training: bool = True, download: bool = True)
Bases:
_SMAPBaseDatasetImplementation of the MSL dataset [Hundman2018]. It consists of several monitored values from a mars rover and commands sent to the rover. We consider the trace for each channel a separate dataset, where the monitored value is in the first feature dimension and the remaining binary features correspond to the commands.
- Parameters: