Skip to main content

Exponential smoothing forecast model

Project description

Introduction

A simple introduction to statistical learning in time-series forecasting. This model is a lightweight and easy to understand example of model traning, testing and implementation. The package enables one to build, train and test a time-series forcasting model using the Simple Exponential Smoothing method.

Learn more here: https://machinelearningmastery.com/exponential-smoothing-for-time-series-forecasting-in-python/

Usage

Download and run the package on your local system. Python version 3.10.0 or greater is advised.

Model

Simple Exponential Smoothing can be interpreted as a weighted average of the time-series values, wherein the weights are either exponentially increasing (greater importance to future values in the time-series) or exponentially decreasing (greater importance to earlier values in the time-series). The "alpha" value or the smoothing parameter lies between 0 and 1: the greater the value of alpha, the greater is the exponentially increasing nature of the weights.

Learn more here: https://btsa.medium.com/introduction-to-exponential-smoothing-9c2d5909a714

Error metrics

Simply put, training the model involves finding the "alpha" value that minimizes the forecast error (difference between true and forecasted values). In this implementation, one can choose from the following error metrics to obtain the optimal "alpha" value:

Error (Cost Function) Parameter Formula
Mean Squared Error (MSE) mean squared error
Root Mean Squared Error (RMSE) root mean squared error
Mean Absolute Error (MAE) mean absolute error
Mean Absolute Percentage Error (MAPE) mean absolute percentage error

Where n represents the number of time-series in the data set.

is the difference between the true and forecasted future values of the time-series i in n.

Learn more about the different cost functions here: https://www.analyticsvidhya.com/blog/2021/10/evaluation-metric-for-regression-models/

Implementation

This model is trained and tested on the M4 dataset of the Makridakis Time-Series Forecasting Competition: https://github.com/Mcompetitions/M4-methods/tree/master/Dataset (Daily-train.csv and Daily-test.csv) using the mean absolute percentage error metric from the table above.

Questions

Contact aparna.komarla@gmail.com with any questions.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ExpSmoothing-0.0.5.tar.gz (11.4 kB view details)

Uploaded Source

Built Distribution

ExpSmoothing-0.0.5-py3-none-any.whl (11.6 kB view details)

Uploaded Python 3

File details

Details for the file ExpSmoothing-0.0.5.tar.gz.

File metadata

  • Download URL: ExpSmoothing-0.0.5.tar.gz
  • Upload date:
  • Size: 11.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/4.0.2 CPython/3.11.6

File hashes

Hashes for ExpSmoothing-0.0.5.tar.gz
Algorithm Hash digest
SHA256 ed25cb4da9dd17692173c529218f5a54031cd70b0305fef32cc3cb23324ea84e
MD5 6d7b7e3f5ed989d1a94891cc7c14b6d9
BLAKE2b-256 a91fc6fa52c21a754158828d205dd502e47a8a12529c607f9a5602b2ebba6743

See more details on using hashes here.

Provenance

File details

Details for the file ExpSmoothing-0.0.5-py3-none-any.whl.

File metadata

  • Download URL: ExpSmoothing-0.0.5-py3-none-any.whl
  • Upload date:
  • Size: 11.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/4.0.2 CPython/3.11.6

File hashes

Hashes for ExpSmoothing-0.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 0f41296411d449ba3efd12a6725f56f7da9e8bcac97854d6c5fc1276b2347e37
MD5 3ce812c6513df36e98429bd1a412ddc0
BLAKE2b-256 b69746037d328d8c60f5ce564213947cb346eeff517465c538eb1140b1a2659e

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page