kumulant

ExponentialSmoothingResult

@Serializable
@SerialName(value = "ExponentialSmoothingResult")
data class ExponentialSmoothingResult(val level: Double, val trend: Double, val seasons: List<Double>, val currentSlot: Int, val phi: Double, val mode: SeasonalMode) : Result(source)

Snapshot from an ExponentialSmoothingStat: level, trend, seasonal factors, and forecast machinery. A stat without seasonality reports a single identity factor.

Constructors

ExponentialSmoothingResult

constructor(level: Double, trend: Double, seasons: List<Double>, currentSlot: Int, phi: Double, mode: SeasonalMode)(source)

Properties

currentSlot

Index 0..period-1 of the next seasonal slot to consume.

level

Smoothed level (one-step-ahead estimate at the current moment).

mode

Seasonal coupling.

period

Length of the seasonal cycle; 1 when the stat has no seasonality.

phi

Damping factor applied to the trend each step (1.0 for an undamped trend).

seasons

Seasonal factors; length equals the configured period and wraps around at horizon h.

trend

Smoothed per-update trend.

Functions

forecast

fun forecast(steps: Int): Double(source)

Project steps updates ahead using the same recurrence shape as the stat. The trend contribution is the damped sum level + (phi + phi^2 + ... + phi^steps) * trend, which is level + steps * trend at phi == 1.0; the seasonal contribution wraps around seasons.