Module

Data.TimeSeries.Model.Exponential

Package
purescript-timeseries
Repository
carldata/purescript-timeseries

#Model Source

data Model

Model for Exponential Smoothing. This model keeps alpha coefficient and last value New value for thi model can be predicted with formula: x[t+1] = alphax[t] + (1-alpha)*l where l is cummulative value

Instances

#ses Source

ses :: Number -> Number -> Model

Initialize Simple Exponential Smoothing model alpha should be inrange [0, 1]

#fromSeries Source

fromSeries :: Number -> Series Number -> Model

Create model from data. Only 10 last data points will be uses to build model

#update Source

update :: Model -> Number -> Model

Update model with new value from Time Series. Online learning

#predictNext Source

predictNext :: Model -> Number

Predict next value