Allows forecasting time series using nearest neighbors regression Francisco Martinez, Maria P. Frias, Maria D. Perez-Godoy and Antonio J. Rivera (2019) <doi:10.1007/s10462-017-9593-z>. When the forecasting horizon is higher than 1, two multi-step ahead forecasting strategies can be used. The model built is univariate and autoregressive, that is, it is only based on the observations of the time series. The nearest neighbors used in a prediction can be consulted and plotted.
| Version: | 0.7.1 |
| Depends: | R (≥ 3.6.0) |
| Imports: | ggplot2 (≥ 3.1.1), graphics, Rcpp, stats, utils |
| LinkingTo: | Rcpp |
| Suggests: | knitr, rmarkdown, testthat (≥ 3.0.0) |
| Published: | 2026-10-13 |
| DOI: | 10.32614/CRAN.package.tsfknn |
| Author: | Francisco Martinez [aut, cre] |
| Maintainer: | Francisco Martinez <fmartin at ujaen.es> |
| BugReports: | https://github.com/franciscomartinezdelrio/tsfknn/issues |
| License: | GPL-2 |
| URL: | https://github.com/franciscomartinezdelrio/tsfknn |
| NeedsCompilation: | yes |
| Citation: | tsfknn citation info |
| Materials: | README, NEWS |
| In views: | TimeSeries |
| CRAN checks: | tsfknn results |
| Reference manual: | tsfknn.html , tsfknn.pdf |
| Vignettes: |
Time Series Forecasting with KNN in R: the tsfknn Package (source, R code) |
| Package source: | tsfknn_0.7.1.tar.gz |
| Windows binaries: | r-devel: tsfknn_0.6.0.zip, r-release: tsfknn_0.6.0.zip, r-oldrel: tsfknn_0.6.0.zip |
| macOS binaries: | r-release (arm64): tsfknn_0.7.1.tgz, r-oldrel (arm64): tsfknn_0.7.1.tgz, r-release (x86_64): not available, r-oldrel (x86_64): not available |
| Old sources: | tsfknn archive |
Please use the canonical form https://CRAN.R-project.org/package=tsfknn to link to this page.