object

time_series_regression

Autoregressive (AR) time series forecaster fitted by least squares, with optional intercept, optional differencing (ARI models), automatic order selection using information criteria, and support for missing observations represented as unbound variables.

Availability:
logtalk_load(time_series_regression(loader))
Author: Paulo Moura
Version: 1:0:0
Date: 2026-10-14
Compilation flags:
static, context_switching_calls
Remarks:
(none)

Public predicates

update/3

Returns a new forecaster after appending one observation. Observation may be left an unbound variable to represent a missing observation; see update/4.

Compilation flags:
static
Template:
update(Forecaster,Observation,UpdatedForecaster)
Mode and number of proofs:
update(+compound,@number,-compound) - one_or_error
Exceptions:
Forecaster is a variable:
instantiation_error
Forecaster is neither a variable nor a valid forecaster:
domain_error(forecaster,Forecaster)
Observation is neither a variable nor a number:
type_error(number,Observation)

forecast_interval/5

Computes analytic prediction interval bounds for the next Horizon forecasts of a learned forecaster, assuming independent, identically distributed, zero-mean Gaussian innovations and treating the fitted coefficients as known. The h-step forecast error variance is the residual variance times the sum of the squared psi weights psi(0)..psi(h-1) of the (integrated) model, and the bounds are the point forecast plus or minus the standard normal quantile for the requested confidence times the forecast error standard deviation. The residual variance is the sum of squared errors divided by the residual degrees of freedom (the number of scored observations minus the design matrix rank). A zero horizon returns two empty lists.

Compilation flags:
static
Template:
forecast_interval(Forecaster,Horizon,Lower,Upper,Options)
Mode and number of proofs:
forecast_interval(+compound,+non_negative_integer,-list(number),-list(number),+list(compound)) - one_or_error
Exceptions:
Forecaster is a variable:
instantiation_error
Forecaster is neither a variable nor a valid forecaster:
domain_error(forecaster,Forecaster)
Horizon is a variable:
instantiation_error
Horizon is neither a variable nor an integer:
type_error(integer,Horizon)
Horizon is an integer but is negative:
domain_error(non_negative_integer,Horizon)
Options is a variable or a partial list:
instantiation_error
Options is neither a variable nor a list:
type_error(list,Options)
An option is a variable or has an unbound argument:
instantiation_error
An option is neither a variable nor a compound term:
type_error(compound,Option)
An option is a compound term but is not a valid interval option:
domain_error(option,Option)
Horizon is positive and the forecaster has no residual degrees of freedom (an exactly determined fit):
domain_error(residual_degrees_of_freedom,Forecaster)

Protected predicates

(no local declarations; see entity ancestors if any)

Private predicates

(no local declarations; see entity ancestors if any)

Operators

(none)