Time Series Forecasting with KNN in R: the tsfknn Package

Abstract:

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.

Cite PDF Tweet

Published

July 29, 2019

Received

May 29, 2018

DOI

10.32614/RJ-2019-004

Volume

Pages

11/2

229 - 242

Supplementary materials

Supplementary materials are available in addition to this article. It can be downloaded at RJ-2019-004.zip

CRAN packages used

forecast, caret, nnfor, tsfknn, forecastHybrid, GMDH, NTS, tsDyn, nnet, neuralnet

CRAN Task Views implied by cited packages

TimeSeries, Econometrics, Finance, MachineLearning, Environmetrics, HighPerformanceComputing, MissingData, Multivariate, SocialSciences

Footnotes

    Reuse

    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 ...".

    Citation

    For attribution, please cite this work as

    Martínez, et al., "The R Journal: 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 = {The R Journal: 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}
    }