Legendre polynomial transformation and energy-weighted random forests for sequential data classification
摘要
The accurate classification of sequential data encompassing time series, sensor streams, and temporal signals is critical for applications ranging from environmental monitoring to industrial fault detection. Traditional machine learning methods often struggle with temporal dependencies, noise, and non-stationary patterns, while deep learning approaches encounter computational bottlenecks and challenges related to interpretability when classifying sequence data. This paper introduces the Legendre Energy-Weighted Random Forest (LEW-RF), a novel framework that integrates Legendre polynomial transformations with Random Forest (RF) to address these limitations. By projecting sequential data onto a Legendre polynomial basis, LEW-RF extracts low-degree coefficients that encode discriminative temporal trends, such as cubic drifts and abrupt anomalies. Specifically, LEW-RF employs feature-wise energies to guide splits in RF. Theoretically, we demonstrate that Legendre energy is correlated with class separability, thereby enabling robustness to noise and irregular sampling. A comprehensive simulation study was performed to evaluate LEW-RF on synthetic sequential datasets with controlled polynomial patterns and noise structures. Results demonstrate that LEW-RF achieves 81.2% accuracy and 86.4% AUC, outperforming conventional RF by 5.3% in accuracy while operating 126 times faster than BiLSTM models. Empirical evaluation on a real-world benchmark eight-hour ozone dataset comprising 2,534 samples across 72 features with severe class imbalance (6.93% harmful ozone days) shows that LEW-RF achieves 97.0% accuracy, 99.6% recall, and 99.8% AUC after class balancing. It outperforms conventional RF by 1.4% in accuracy while operating 228 times faster than BiLSTM. In addition, the importance of the LEW-RF interpretable feature aligns with atmospheric science principles, identifying critical temporal sensors (T13–T15) that drive photochemical pollution events.