Polynomial Order Selection for Savitzky-Golay Smoothers via N-fold Cross-Validation (extended version)
Cagatay Candan
TL;DR
The paper tackles the challenge of selecting the polynomial order in Savitzky-Golay smoothing by introducing an N-fold cross-validation framework that leverages the problem's minimum-norm formulation and projection-space structure. It presents a QR-based, linearly scalable algorithm that computes the cross-validated error efficiently and enables reliable order selection in non-asymptotic regimes. Compared with BIC variants, the proposed method demonstrates superior performance for moderate window lengths and SNR, and exhibits robustness to impulsive noise. The work provides practical, tuning-free guidance for SG design and includes ready-to-use MATLAB code for replication.
Abstract
Savitzky-Golay (SG) smoothers are noise suppressing filters operating on the principle of projecting noisy input onto the subspace of polynomials. A poorly selected polynomial order results in over- or under-smoothing which shows as either bias or excessive noise at the output. In this study, we apply the N-fold cross-validation technique (also known as leave-one-out cross-validation) for model order selection and show that the inherent analytical structure of the SG filtering problem, mainly its minimum norm formulation, enables an efficient and effective order selection solution. More specifically, a novel connection between the total prediction error and SG-projection spaces is developed to reduce the implementation complexity of cross-validation method. The suggested solution compares favorably with the state-of-the-art Bayesian Information Criterion (BIC) rule in non-asymptotic signal-to-noise ratio (SNR) and sample size regimes. MATLAB codes reproducing the numerical results are provided.
