powered by
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"))
An integer.
A numeric vector or time series of class ts.
ts
A positive integer. Number of values to forecast.
An integer vector in increasing order expressing the lags used as autoregressive variables.
A string indicating the Multiple-Step Ahead Strategy used when more than one value is predicted. It can be "recursive" or "MIMO" (the default).
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")
Run the code above in your browser using DataLab