Number of training examples
It computes the number of training examples that would have a KNN model with the specified parameters.
n_training_examples(timeS, h, lags, msas = c("MIMO", "recursive"))
timeS
: A numeric vector or time series of class ts
.h
: A positive integer. Number of values to forecast.lags
: An integer vector in increasing order expressing the lags used as autoregressive variables.msas
: A string indicating the Multiple-Step Ahead Strategy used when more than one value is predicted. It can be "recursive" or "MIMO" (the default).An integer.
n_training_examples(ts(1:10), h = 2, lags = 1:3, msas = "MIMO") n_training_examples(ts(1:10), h = 2, lags = 1:3, msas = "recursive")
Useful links