Nearest neighbors associated with predictions
It allows to check the new instances and their nearest neighbors used in a prediction associated with a "knnForecast" object.
nearest_neighbors(forecast)
forecast
: A knnForecast
object.A list including the new instances used in KNN regression and their nearest neighbors.
pred <- knn_forecasting(UKgas, h = 4, lags = 1:4, k = 2, msas = "MIMO") nearest_neighbors(pred)
Useful links