Git Product home page Git Product logo

time-series-prediction-of-monthly-data's Introduction

Time-series-prediction-of-monthly-data

Provides the code to implement additive and multiplicative decompositoin model to monthly time series for forecast, testing and visualisation.

Model description

The decomposition model decomposes a time series into serveal components. Typically, they are trend component, seasonal component, cycle component and residual. In this work, only trend, seasonal, and residual components are considered. Cycle component is very hard to be generalised. The trend component is estimated by a polynominal regression of a chosen order. If order is 1, it is a linear regression.

Additive decomposition model: X_t = T_t + S_t + e_t

Multiplicative decomposition model: X_t = T_t * S_t * e_t

The suitable time series dataset for decomposition model is evenly-spaced data with seasonal pattern. The prediction is normally for short and medium term to aviod the trend component to explode.

Motivation

Compared with more advanced predictive models for (evenly-spaced) time series problems, such as Holt-Winters and ARIMA, decomposition model provides more intuitive prospect for analysis. For most time series with regular seasonality, decomposition model is no worse than more advanced models.

Walkthough with Australian tourists data.

Original data Original

Decomposed components components

Final prediction prediction

Download Module

Sample demonstration:

import decomposition

mdl_additive = decomposition.decomposition_additive()
mdl_multiplicative = decomposition.decomposition_multiplicative()

# Training and testing
mdl_additive.fit(train)
test_pred = mdl_additive.test(test)

# Prediction 
prediction = mdl_additive.predict(months = 36)

time-series-prediction-of-monthly-data's People

Contributors

onefless avatar

Stargazers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.