Learn R Programming

tsfknn (version 0.6.0)

knn_examples: Examples of the model associated with a prediction

Description

It allows to see the examples of the model associated to a knnForecast object.

Usage

knn_examples(forecast)

Value

A matrix including the features and targets of the examples associated with the model of a knnForecast object.

Arguments

forecast

A knnForecast object.

Examples

Run this code
pred <- knn_forecasting(ts(1:8), h = 1, lags = 1:2, k = 2)
knn_examples(pred)

Run the code above in your browser using DataLab