n_training_examples {tsfknn} | R Documentation |
Number of training examples
Description
It computes the number of training examples that would have a KNN model with the specified parameters.
Usage
n_training_examples(timeS, h, lags, msas = c("MIMO", "recursive"))
Arguments
timeS |
A numeric vector or time series of class |
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). |
Value
An integer.
Examples
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")
[Package tsfknn version 0.6.0 Index]