object

exponential_smoothing

Simple, Holt linear-trend, and additive or multiplicative Holt-Winters exponential smoothing forecaster.

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

Public predicates

update/3

Returns a new forecaster after applying one numeric observation or, under skip_update, an unbound variable representing a missing observation. Does not bind missing observations.

Compilation flags:
static
Template:
update(Forecaster,Observation,UpdatedForecaster)
Mode and number of proofs:
update(+compound,@term,-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 a variable under the error missing policy:
instantiation_error
Observation is neither a variable nor a number:
type_error(number,Observation)
Observation is a number but is not finite:
domain_error(finite_number,Observation)
Observation is incompatible with the learned transformation:
domain_error(positive_transformation_series,Observation)
Observation is incompatible with a multiplicative model:
domain_error(positive_multiplicative_series,Observation)
The multiplicative level update is not positive:
domain_error(positive_multiplicative_level,Level)
Update or diagnostic arithmetic fails:
evaluation_error(Error)

forecast_interval/5

Computes residual-bootstrap prediction interval bounds for the next Horizon forecasts of a learned forecaster. Requires a forecaster learned with the retain_residuals(true) learning option. For each of samples/1 simulated paths and each horizon step, independently resamples, with replacement, one retained one-step training residual, adds it to the deterministic point forecast for that step (thus preserving the seasonal phase of the point forecast), and inverse-transforms the simulated value using the same transformation and bias adjustment as forecast/3. The reported bounds are the empirical (1-confidence)/2 and (1+confidence)/2 quantiles of the simulated values for each step, widened when necessary so that the point forecast always lies within its bounds. A zero horizon returns two empty lists and does not require retained residuals.

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:
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 was learned without retain_residuals(true):
domain_error(retained_residuals,Forecaster)

Protected predicates

(no local declarations; see entity ancestors if any)

Private predicates

(no local declarations; see entity ancestors if any)

Operators

(none)