build_examples: Build the training examples

View source: R/build_examples.R

build_examplesR Documentation

Build the training examples

Description

Build the training examples for a regressive model to forecast a time series using lagged values of the series as autoregressive features.

Usage

build_examples(timeS, lags)

Arguments

timeS

The time series.

lags

An integer vector with the lags used as feature vector in decreasing order.

Value

A list with two fields: 1) a matrix with the features of the examples and 2) a vector with the targets of the examples

Examples

build_examples(ts(1:5), lags = 2:1)

utsf documentation built on April 22, 2026, 9:08 a.m.