基于朴素模型的预测模型包
forecast-x的Python项目详细描述
Forecast_x:带有时间序列原始模型的工具包。
**如果你有兴趣在财务上支持我的开源,请考虑visiting this link。 你的支持对这项工作的可持续性有很大帮助。
forecast_x是一个纯python包,它提供不同的原始模型来拟合多个时间序列, 特别是在间歇过程中,由于其强大的灵活性和易用性。
此库可用于多个关注制造过程的行业,其中预测模型 原材料消耗计划需要低成本的误差。
型号
Forecast_x使用以下模型生成预测:
- 模型天真
- 模型海天真
- 模型平均两个周期
- 模型平均三个周期
- 模型半海平均值
- 模型海周期平均值
- 模型双海平均值
- 模型海增长
- 模型博览会加权
- 模型三次方平均值
- 模型多海平均值
- 模型海双平均增长
- 模型大均值
- 模型平滑大均值
- 模型最后一个海的平均值
- 模型海流平均海
- 模型平滑双海天真
- 模型截断平均值
- 模型谐波平均值
- Heronian模型均值
开始:10秒预测x
下面是如何使用Forecast_x
模型:
fromforecast_ximportforecast_xasfx# time series observationtime_series=[51,17,28,37,52,21,34,47,38,35,7,27]freq=12# monthlyh=12# forecast months ahead# Creating the forecast objectf=fx.forecast(time_series,freq,h)# Applying any the model from the packagemodel=f.model_naive()# The model variable would produce a list of three elements:# - Fitting Values# - Error# - Forecastmodel
要仅获取给定模型的预测,您应该使用:
f.get_forecast('model_naive')
要允许软件包根据多个交叉验证选择最佳匹配,您应该使用:
model=f.best_model()# forecast_x would select 'model_seas_period_mean' as best model based on test resultsmodel# Getting forecast from best modelforecast=get_forecast(model)
安装
# or PyPI
pip install forecast_x
依赖关系
- 没有。
python版本
支持3.5、3.6和3.7。
许可证
文档
官方文件很快就会提供。
引文
非常欢迎对任何工作或项目的引用或认可:
Alejandro De Barros. 2018. Forecast_x: An open source forecasting tool for time series library for Python
元
亚历杭德罗德巴罗斯(alejandro de barros)“(https://twitter.com/alejandrodbn)和alejandrodbn@gmail.com
根据麻省理工学院的许可证发行。有关详细信息,请参见LICENSE
。
https://github.com/alejandrodbn/forecast
行为准则
与此项目的代码库、问题跟踪程序和邮件列表进行交互的每个人都应该遵循行为准则。