Samya Tajmouati, Bouazza E. L. Wahbi, Adel Bedoui, Abdallah Abarda, Mohamed Dakkon
{"title":"Applying k-nearest neighbors to time series forecasting: Two new approaches","authors":"Samya Tajmouati, Bouazza E. L. Wahbi, Adel Bedoui, Abdallah Abarda, Mohamed Dakkon","doi":"10.1002/for.3093","DOIUrl":null,"url":null,"abstract":"<p>The <i>k</i>-nearest neighbors algorithm is one of the prominent techniques used in classification and regression. Despite its simplicity, the <i>k</i>-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 for 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 other 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 United States and milk production in the United Kingdom are analyzed to demonstrate the application and efficiency of the proposed approaches.</p>","PeriodicalId":47835,"journal":{"name":"Journal of Forecasting","volume":null,"pages":null},"PeriodicalIF":3.4000,"publicationDate":"2024-02-25","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Journal of Forecasting","FirstCategoryId":"96","ListUrlMain":"https://onlinelibrary.wiley.com/doi/10.1002/for.3093","RegionNum":3,"RegionCategory":"经济学","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"Q1","JCRName":"ECONOMICS","Score":null,"Total":0}
引用次数: 0
Abstract
The 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 for 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 other 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 United States and milk production in the United Kingdom are analyzed to demonstrate the application and efficiency of the proposed approaches.
k 近邻算法是用于分类和回归的重要技术之一。尽管 k 近邻算法非常简单,但它已成功应用于时间序列预测。然而,邻居数量的选择和特征选择是一项艰巨的任务。在本文中,我们介绍了两种预测时间序列的方法,分别称为加权近邻中的经典参数调整和加权近邻中的快速参数调整。第一种方法使用经典参数调整,将最近的子序列与过去所有可能的相同长度的子序列进行比较。第二种方法减少了近邻搜索集,从而大大减少了网格大小,从而降低了计算时间。为了调整模型参数,两种方法都采用了加权近邻交叉验证法。我们评估了模型的预测性能和准确性。然后,我们将它们与其他方法进行比较,特别是季节自回归综合移动平均法、霍尔特-温特斯法和指数平滑状态空间模型。我们对美国零售和食品服务销售以及英国牛奶生产的真实数据进行了分析,以证明所提方法的应用和效率。
期刊介绍:
The Journal of Forecasting is an international journal that publishes refereed papers on forecasting. It is multidisciplinary, welcoming papers dealing with any aspect of forecasting: theoretical, practical, computational and methodological. A broad interpretation of the topic is taken with approaches from various subject areas, such as statistics, economics, psychology, systems engineering and social sciences, all encouraged. Furthermore, the Journal welcomes a wide diversity of applications in such fields as business, government, technology and the environment. Of particular interest are papers dealing with modelling issues and the relationship of forecasting systems to decision-making processes.