In this paper the tsfknn package for time series forecasting using k-nearest neighbor regres sion is described. This package allows users to specify a KNN model and to generate its forecasts. The user can choose among different multi-step ahead strategies and among different functions to aggregate the targets of the nearest neighbors. It is also possible to assess the forecast accuracy of the KNN model.
Supplementary materials are available in addition to this article. It can be downloaded at RJ-2019-004.zip
forecast, caret, nnfor, tsfknn, forecastHybrid, GMDH, NTS, tsDyn, nnet, neuralnet
TimeSeries, Econometrics, Finance, MachineLearning, Environmetrics, HighPerformanceComputing, MissingData, Multivariate, SocialSciences
Text and figures are licensed under Creative Commons Attribution CC BY 4.0. The figures that have been reused from other sources don't fall under this license and can be recognized by a note in their caption: "Figure from ...".
For attribution, please cite this work as
Martínez, et al., "Time Series Forecasting with KNN in R: the tsfknn Package", The R Journal, 2019
BibTeX citation
@article{RJ-2019-004, author = {Martínez, Francisco and Frías, María P. and Charte, Francisco and Rivera, Antonio J.}, title = {Time Series Forecasting with KNN in R: the tsfknn Package}, journal = {The R Journal}, year = {2019}, note = {https://doi.org/10.32614/RJ-2019-004}, doi = {10.32614/RJ-2019-004}, volume = {11}, issue = {2}, issn = {2073-4859}, pages = {229-242} }