ggb/elm-trend/1.0.0

NOTE: this package is not compatible with Elm 0.19.1

Seasonal

Contains functions to create a seasonal forecast based on the Holt-Winters method for seasonal forecasting.

forecast : Int -> List Float -> Maybe (List Float)

Creates a forecast with default parameters (alpha = 0.5, beta = 0.4, gamma = 0.6, number of forecasted values = length of period). You only need to specify the length of a season (number of values per season).

forecastWith : Float -> Float -> Float -> Int -> Int -> List Float -> Maybe (List Float)

Creates a seasonal forecast. Set the following parameters:

  • alpha: overall smoothing parameter (between 0 and 1)
  • beta: seasonal smoothing parameter (between 0 and 1)
  • gamma: trend smoothing parameter (between 0 and 1)
  • m: number of values to forecast (between 0 and period)
  • period: values per season (length of period) in the historical data
  • data: list of float values with historical data