ts_regsw: TSRegSW

View source: R/ts_regsw.R

ts_regswR Documentation

TSRegSW

Description

Base class for time series regression models built on sliding-window representations.

Usage

ts_regsw(preprocess = NA, input_size = NA, input_map = ts_lagmap())

Arguments

preprocess

Normalization preprocessor (e.g., ts_norm_gminmax()).

input_size

Integer. Number of lagged inputs per example.

input_map

Lag-selection strategy object created by ts_lagmap().

Details

This class provides helpers to map ts_data matrices into the input window expected by ML backends and to apply pre/post processing (e.g., normalization) consistently during fit and predict.

The preprocessing stage runs before input_map is fitted. So lag selection is learned on the transformed representation actually delivered to the backend model, not on the raw pre-transform window. This matters for preprocessors such as ts_norm_diff() that change the effective window geometry.

Value

A ts_regsw object (S3) to be extended by concrete models.

Examples

# Abstract base class for sliding-window regressors
# Use concrete subclasses such as ts_mlp(), ts_rf(), ts_svm(), ts_elm()

tspredit documentation built on Sept. 9, 2026, 9:08 a.m.