Applying k-nearest neighbors to time series forecasting : two new approaches
Not on the map. Why?
Abstract (arXiv)
K-nearest neighbors algorithm is one of the prominent techniques used in classification and regression. Despite its simplicity, the k-nearest neighbors has been successfully applied in time series forecasting. However, the selection of the number of neighbors and feature selection is a daunting task. In this paper, we introduce two methodologies to forecasting time series that we refer to as Classical Parameters Tuning in Weighted Nearest Neighbors and Fast Parameters Tuning in Weighted Nearest Neighbors. The first approach uses classical parameters tuning that compares the most recent subsequence with every possible subsequence from the past of the same length. The second approach reduces the neighbors' search set, which leads to significantly reduced grid size and hence a lower computational time. To tune the models' parameters, both methods implement an approach inspired by cross-validation for weighted nearest neighbors. We evaluate the forecasting performance and accuracy of our models. Then, we compare them to some classical approaches, especially, Seasonal Autoregressive Integrated Moving Average, Holt-Winters and Exponential Smoothing State Space Model. Real data examples on retail and food services sales in the USA and milk production in the UK are analyzed to demonstrate the application and the efficiency of the proposed approaches.
Key facts. Cited by 4 papers in the map (data through 7 Oct 2026). First posted on arXiv 26 Mar 2021.
Builds on
No reference list yet.
Built on by
Citing papers per year: 2021: 1; 2022: 1; 2023: 0; 2024: 0; 2025: 0; 2026: 2.
4 papers.
- 2022Multi-Variate Time Series Forecasting on Variable Subsetscited by 5
- 2026TS-Memory: Plug-and-Play Memory for Time Series Foundation Modelscited by 5
- 2021Applying Regression Conformal Prediction with Nearest Neighbors to time series datacited by 1
- 2026A Comparative Analysis of Machine Learning Models for Long and Short-Term Forecasting of the Egyptian Stock Market: A Focus on EGX30cited by 0
- 2026A Comparative Analysis of Machine Learning Models for Long and Short-Term Forecasting of the Egyptian Stock Market: A Focus on EGX3015 Jul 2026
- 2026TS-Memory: Plug-and-Play Memory for Time Series Foundation Models12 Feb 2026
- 2022Multi-Variate Time Series Forecasting on Variable Subsets25 Jun 2022
- 2021Applying Regression Conformal Prediction with Nearest Neighbors to time series data25 Oct 2021