Introduction
Time series classification is a critical task across diverse domains, from monitoring cardiac health via ECGs to analyzing industrial sensor outputs. Historically, two distinct academic communities have approached this problem: Functional Data Analysis (FDA), which treats time series as continuous functions and emphasizes statistical interpretability, and Machine Learning (ML), which treats them as high-dimensional vectors and prioritizes predictive accuracy. This paper bridges the gap between these fields by introducing mlrFDA, a unified R-based framework, and conducting a rigorous head-to-head benchmark.
The mlrFDA Framework
The authors developed mlrFDA as an extension of the mlr machine learning library. This integration allows functional data to be treated as a first-class citizen within standard ML pipelines. By providing a consistent interface, mlrFDA enables practitioners to easily compare specialized FDA models—which often reside in siloed packages—against state-of-the-art ML algorithms like Random Forests or XGBoost.
Datasets and Functional Data
The benchmark utilized 51 datasets from the UCR Time Series Archive, covering medical, industrial, and image-outline applications. These datasets represent "functional data" where observations are curves rather than discrete points.
The study focused on small-to-medium datasets (under 10,000 instances and 750 measurements) to ensure the feasibility of extensive hyperparameter tuning using Bayesian Optimization.
Benchmarking Methodology
Three primary strategies were evaluated:
- Direct FDA Modeling: Utilizing methods like Functional Generalized Additive Models (FGAM) and
FDboostthat handle functional data natively. - ML with Feature Extraction: Transforming curves into scalar features via Wavelets, Fourier transforms, or B-splines, then applying standard learners like Random Forest (
ranger) or XGBoost. - Raw ML: Applying standard ML algorithms directly to discretized raw data.
A key contribution of this work is the systematic use of Bayesian Optimization to tune both the feature extraction parameters and the learners, a step often omitted in traditional FDA research.
Key Insights and Results
The benchmark revealed several critical findings:
- Feature Extraction is Essential: Pipelines combining wavelet or B-spline extraction with Random Forests consistently outperformed models using raw data.
- The Performance Gap: While FDA methods like
FDboostoffer superior interpretability through statistically valid coefficients, they generally struggled to match the raw predictive power of tuned ML ensembles. - Tuning Matters: Automated hyperparameter tuning improved accuracy by an average of 5.4%, with even larger gains for specific methods like Fourier transforms.
- Top Performers: The combination of Wavelet extraction and tuned Random Forest emerged as the overall winner. Notably,
mlrFDApipelines achieved within 95% of optimal performance on 47 of the 51 datasets, even surpassing previous state-of-the-art results in nine cases.
Conclusion and Future Work
While ML-based feature extraction currently dominates in accuracy, FDA remains vital for applications requiring high interpretability. Future development of mlrFDA will focus on supporting irregular measurement grids, integrating curve alignment (registration), and implementing complex ensemble methods to further push the boundaries of time series classification.
Summary updated