knn_examples: Examples of the model associated with a prediction

View source: R/forecasting.R

knn_examplesR Documentation

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)

Arguments

forecast

A knnForecast object.

Value

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

Examples

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

tsfknn documentation built on Sept. 4, 2023, 9:06 a.m.