ExpSmoothing


NameExpSmoothing JSON
Version 0.1.9 PyPI version JSON
download
home_pagehttps://github.com/akomarla/ExpSmoothing
SummaryExponential smoothing forecast model
upload_time2023-12-01 23:23:41
maintainer
docs_urlNone
authorAparna Komarla
requires_python
license
keywords python time-series forecasting exponential smoothing error metrics
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # 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 sum of the time-series values wherein the weights are exponentially increasing (greater importance to future values in the time-series). The "alpha" value or the smoothing parameter lies between 0 and 1: the alpha value is directly proportional to 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```  | <img src = "https://github.com/akomarla/ExpSmoothing/assets/124313756/a58bc3d7-6661-4995-825d-b031bd62016a" width = "45%" height = "45%"> <tr></tr> |
| Root Mean Squared Error (RMSE) |  ```root mean squared error```  | <img src = "https://github.com/akomarla/ExpSmoothing/assets/124313756/13106816-f256-4e74-ad06-b20470cc6f74" width = "45%" height = "45%"> <tr></tr> |
| Mean Absolute Error (MAE) |  ```mean absolute error```  | <img src = "https://github.com/akomarla/ExpSmoothing/assets/124313756/a5821e63-0020-4fa2-aea7-993ba6c6babe" width = "45%" height = "45%"> <tr></tr> |
| Mean Absolute Percentage Error (MAPE) |  ```mean absolute percentage error```  | <img src = "https://github.com/akomarla/ExpSmoothing/assets/124313756/4825f7e2-f0c6-4396-b27f-2333542f2d84" width = "45%" height = "45%"> <tr></tr> |

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

<img src = "https://github.com/akomarla/ExpSmoothing/assets/124313756/f5b6b8c5-2d78-4313-be97-f4dd35b8f7ea" width = "7%" height = "7%"> 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.


            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/akomarla/ExpSmoothing",
    "name": "ExpSmoothing",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "python,time-series,forecasting,exponential smoothing,error metrics",
    "author": "Aparna Komarla",
    "author_email": "<aparna.komarla@email.com>",
    "download_url": "https://files.pythonhosted.org/packages/3f/44/be0d13427268a5561ebb9751b04572d4531df1bf9b58e99d01eb3137679d/ExpSmoothing-0.1.9.tar.gz",
    "platform": null,
    "description": "# Introduction\n 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. \n\nLearn more here: https://machinelearningmastery.com/exponential-smoothing-for-time-series-forecasting-in-python/ \n\n# Usage \nDownload and run the package on your local system. Python version 3.10.0 or greater is advised.\n\n# Model \nSimple Exponential Smoothing can be interpreted as a weighted sum of the time-series values wherein the weights are exponentially increasing (greater importance to future values in the time-series). The \"alpha\" value or the smoothing parameter lies between 0 and 1: the alpha value is directly proportional to the exponentially increasing nature of the weights.\n\nLearn more here: https://btsa.medium.com/introduction-to-exponential-smoothing-9c2d5909a714\n\n## Error metrics \nSimply 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:\n| Error (Cost Function) | Parameter | Formula |\n| ------------ | ------------------- | --------- |\n| Mean Squared Error (MSE) |  ```mean squared error```  | <img src = \"https://github.com/akomarla/ExpSmoothing/assets/124313756/a58bc3d7-6661-4995-825d-b031bd62016a\" width = \"45%\" height = \"45%\"> <tr></tr> |\n| Root Mean Squared Error (RMSE) |  ```root mean squared error```  | <img src = \"https://github.com/akomarla/ExpSmoothing/assets/124313756/13106816-f256-4e74-ad06-b20470cc6f74\" width = \"45%\" height = \"45%\"> <tr></tr> |\n| Mean Absolute Error (MAE) |  ```mean absolute error```  | <img src = \"https://github.com/akomarla/ExpSmoothing/assets/124313756/a5821e63-0020-4fa2-aea7-993ba6c6babe\" width = \"45%\" height = \"45%\"> <tr></tr> |\n| Mean Absolute Percentage Error (MAPE) |  ```mean absolute percentage error```  | <img src = \"https://github.com/akomarla/ExpSmoothing/assets/124313756/4825f7e2-f0c6-4396-b27f-2333542f2d84\" width = \"45%\" height = \"45%\"> <tr></tr> |\n\nWhere n represents the number of time-series in the data set. \n\n<img src = \"https://github.com/akomarla/ExpSmoothing/assets/124313756/f5b6b8c5-2d78-4313-be97-f4dd35b8f7ea\" width = \"7%\" height = \"7%\"> is the difference between the true and forecasted future values of the time-series i in n.\n\nLearn more about the different cost functions here: https://www.analyticsvidhya.com/blog/2021/10/evaluation-metric-for-regression-models/\n\n## Implementation \nThis 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. \n\n# Questions\nContact aparna.komarla@gmail.com with any questions.\n\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "Exponential smoothing forecast model",
    "version": "0.1.9",
    "project_urls": {
        "Homepage": "https://github.com/akomarla/ExpSmoothing"
    },
    "split_keywords": [
        "python",
        "time-series",
        "forecasting",
        "exponential smoothing",
        "error metrics"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "4cbcb860ecaec040a46792454364de6a3ec1f6ef46fa2a981b452e2dac3fda8d",
                "md5": "059927dc7e36dba9fbdb8cf5cc7df921",
                "sha256": "f25545736c2f410d4d652b6e8afd1abe638a056e401afd1618e135aaeddd8450"
            },
            "downloads": -1,
            "filename": "ExpSmoothing-0.1.9-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "059927dc7e36dba9fbdb8cf5cc7df921",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 12129,
            "upload_time": "2023-12-01T23:23:40",
            "upload_time_iso_8601": "2023-12-01T23:23:40.294986Z",
            "url": "https://files.pythonhosted.org/packages/4c/bc/b860ecaec040a46792454364de6a3ec1f6ef46fa2a981b452e2dac3fda8d/ExpSmoothing-0.1.9-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "3f44be0d13427268a5561ebb9751b04572d4531df1bf9b58e99d01eb3137679d",
                "md5": "1f3c1ef9c06b43cdfd45c9ed3be533ce",
                "sha256": "44153a5d45dd870c8bb76b67d2bbca39ac195721f1fe7df78a0cb2c9d63dd166"
            },
            "downloads": -1,
            "filename": "ExpSmoothing-0.1.9.tar.gz",
            "has_sig": false,
            "md5_digest": "1f3c1ef9c06b43cdfd45c9ed3be533ce",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 11675,
            "upload_time": "2023-12-01T23:23:41",
            "upload_time_iso_8601": "2023-12-01T23:23:41.773013Z",
            "url": "https://files.pythonhosted.org/packages/3f/44/be0d13427268a5561ebb9751b04572d4531df1bf9b58e99d01eb3137679d/ExpSmoothing-0.1.9.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-12-01 23:23:41",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "akomarla",
    "github_project": "ExpSmoothing",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "expsmoothing"
}
        
Elapsed time: 0.14310s