Isolation Forest to detect anomalies in time series data

Learn to detect anomalies in time series with Python, using advanced techniques and Machine Learning algorithms.

Based on the energy generation bids recorded by EOLICA AUDAX (ADXVD04) in the OMIE market during 2023, this article presents an analysis of anomalies in the time series.

Visualization of detected anomalies in the energy generation bids of EOLICA AUDAX (ADXVD04) in the OMIE market during 2023.
F1. Initial anomaly detection

In this tutorial, you’ll learn how to develop an anomaly detection model for time series with Python based on a practical case.

Data

Each row represents the energy that the bidding unit ADXVD04 has recorded in the OMIE market during 2023.

import pandas as pd
df = pd.read_csv('data.csv')
Representation of the raw data of energy bids by the unit ADXVD04 in the OMIE market throughout 2023, before applying anomaly detection techniques
F2. Raw energy bid data

Questions

  1. How to extract temporal properties to detect anomalies?
  2. How to use the Isolation Forest algorithm to identify anomalous data?
  3. How to configure the algorithm to detect a specific percentage of data as anomalous?
  4. What techniques are used to visualize anomalous data in the time series?

Great! You’ve successfully signed up.

Welcome back! You've successfully signed in.

You've successfully subscribed to datons.

Success! Check your email for magic link to sign-in.

Success! Your billing info has been updated.

Your billing was not updated.