Skip to content
Time Series Forecasting Using KNN
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
R
man
tests
vignettes Correct typo in vignette Feb 15, 2019
.Rbuildignore
.gitignore
.travis.yml
DESCRIPTION
NAMESPACE
NEWS.md print, summary and print.summary methods added Apr 9, 2019
README.Rmd
README.md Correct typo Feb 13, 2019
cran-comments.md
tsfknn.Rproj

README.md

tsfknn

The goal of tsfknn is to forecast time series using KNN regression

Installation

You can install tsfknn from github with:

# install.packages("devtools")
devtools::install_github("franciscomartinezdelrio/tsfknn")

Example

This is a basic example which shows you how to forecast with tsfknn:

library(tsfknn)
pred <- knn_forecasting(USAccDeaths, h = 12, k = 3)
pred$prediction # To see a time series with the forecasts
plot(pred) # To see a plot with the forecast
library(ggplot2)
autoplot(pred, highlight = "neighbors")  # To see the nearest neighbors
You can’t perform that action at this time.