Regression and time series forecasting
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
example
src
.gitignore
LICENSE
README.md
elm.json
trends.png

README.md

elm-trend

Calculate trend lines and forecast based on seasonal data.

The github-page shows a nice example chart.

The chart was created with wuct/elm-charts.

Installation

elm package install ggb/elm-trend

Usage

Usage is straightforward:

import Linear
import Seasonal

data = 
  [ 362, 385, 432, 341, 382, 409, ... ]

-- Create linear trend function
linearTrend = Linear.regression data

-- Seasonal forecast
period = 4
forecastData = Seasonal.forecast period

Take a look at example/SeasonalTest.elm for a more detailed example.

Future

Ideas for future development:

  • Implementing ARIMA
  • Multivariant regression and other regression types