Comparative study of unsupervised anomaly detection methods on imbalanced time series data - Hanifa, Riza Aulia; Thobirin, Aris; Surono, Sugiyarto (Universitas Trunojoyo Madura, 2025)
Anomaly detection in time series data is essential, especially when dealing with imbalanced datasets such as air quality records. This study addresses the challenge of identifying point anomalies rare and extreme pollution levels within a highly imbalanced dataset. Failing to detect such anomalies may lead to delayed environmental interventions and poor public health responses. To solve this, we propose a comparative analysis of three unsupervised learning methods: K-means clustering, Isolation Forest (IForest), and Autoencoder (AE), including its LSTM variant. These algorithms are applied to monthly air quality data collected in 2023 from 2,110 cities across Asia. The models are evaluated using Area Under the Curve (AUC), Precision, Recall, and F1-score to assess their effectiveness in detecting anomalies. Results indicate that the Autoencoder and Autoencoder LSTM outperform the others with an AUC of 98.23%, followed by K-means (97.78%) and IForest (96.01%). The Autoencoder’s reconstruction capability makes it highly effective for capturing complex temporal patterns. K-means and IForest also show strong results, offering efficient and interpretable solutions for structured data. This research highlights the potential of unsupervised anomaly detection techniques for environmental monitoring and provides practical insights into handling imbalanced time series data.