Litcius/Paper detail

A Novel Approach to Speed Up Hampel Filter for Outlier Detection

Mario Roos-Hoefgeest, A. Menéndez, Sara Roos Hoefgeest Toribio, Ignacio Álvarez

2025Sensors15 citationsDOIOpen Access PDF

Abstract

Outlier detection is a critical task in time series analysis, essential to maintaining data quality and allowing for accurate subsequent analysis. The Hampel filter, a decision filter that replaces outliers in a data window with the median, is widely used for outlier detection in time series due to its simplicity and effectiveness. While effective, its computational complexity, primarily due to the calculation of the Median Absolute Deviation (MAD), poses limitations for large-scale and real-time applications. This paper proposes a novel Hampel filter variant that replaces the MAD with an original estimator (mMAD) that retains statistical robustness but is computationally more efficient. This reduces the filter’s computational complexity from O(N·wlogw) to O(N·w), where N is the data length and w the window size. The proposed variant significantly lowers processing time and resource consumption, making it especially suitable for large-scale and real-time data processing while preserving robust outlier detection performance.

Topics & Concepts

Anomaly detectionOutlierComputer scienceFilter (signal processing)Data miningArtificial intelligencePattern recognition (psychology)Computer visionAnomaly Detection Techniques and ApplicationsAdvanced Statistical Methods and ModelsFault Detection and Control Systems