energy_fault_detector.evaluation.predist_dataset
- class PreDistDataset(path, download_dataset=False)
Bases:
objectLoader and preprocessor for the PreDist dataset.
The data can be downloaded either manually from https://doi.org/10.5281/zenodo.17522254 (in this case specify path) or it can be downloaded automatically by setting download_dataset to True.
- Parameters:
- FAULT_HOURS_AFTER = 24
- FAULT_HOURS_BEFORE = 48
- create_normal_flag(data, manufacturer, substation_id)
Create a normal flag based on disturbances, so we can select normal behaviour for training models.
- Parameters:
- Returns:
Normal flag (boolean) based on disturbances with the same timestamp index as data.
- Return type:
pd.Series
- get_event_data(manufacturer, event_id, max_training_days=730)
Extracts training and test slices for a specific event row (fault or normal).
- load_substation_data(manufacturer, substation_id)
Loads raw CSV, maps string values, and cleans indices.
- Return type:
DataFrame