Skip to content

EINS-TUDa/EXPLAD-Anomaly-Detection-with-Probabilistic-Forecasting

Repository files navigation

EXPLAD: EXplainable Probabilistic Load Anomaly Detection

This repository contains the code for the paper "Explainable Anomaly Detection for Grid Monitoring using Probabilistic Load Forecasting"

This project uses (probabilistic) load forecasting methods and detection methods for testing anomaly detection in household power consumption data.

Contents

The code is separated into different folders containing specific functionalities:

Contains definitions of synthetic anomaly scenarios.

Contains functions for data loading, preprocessing, and feature extraction.

Contains classes for anomaly detection methods (deterministic+probabilistic) and evaluation.

Contains classes for the probabilistic forecasting models, fitting, and evaluation.

Setup

This dataset was used: https://www.nature.com/articles/s41597-022-01156-1

The hdf5 files should be placed in the folder "data/" in the root folder.

Usage

The workflow is divided into two main steps:

1. Load Forecast Training

The file main_loadforecast.py loads the training data, trains the forecasting models, and saves the models to a pickle file fc_models.pkl.

2. Anomaly Detection Testing

With the file main_anomalydetection.py, the previously trained models are loaded, the defined anomalies are applied to the test data, and the detection methods are executed. The results can be evaluated with classification metrics and ROC analysis.

Config

The configuration file config.py contains settings and parameters for data periods, forecasting methods, defined anomalies, and detection methods.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages