USEP价格预测

nextstep的Python项目详细描述


下一步

简介

NEX-TEP集成了所有主流机器学习算法的TSAN-TEP软件包。同时,它通过将关键的超参数提取到配置字典中来解除编程限制,使经验较少的python用户能够探索机器学习。在

Nextstep最初是为一个涉及价格预测的数据科学挑战而开发的。因此,它有一个专门的模块,可以通过开放API或web抓取来获取数据(石油和天气)。它演变成一个机器学习预测工具箱。在

安装

首次安装

pip install nextstep

升级至最新版本

^{pr2}$

快速教程

getData模块

产生油价

fromnextstep.getData.oilimport*oil_prices.process()

布伦特_每日.csvwti_每日.csv将在当前目录下生成。它们包含了直到最近一天的历史油价。在

生成天气数据

此函数依赖于来自worldweatheronline的API密钥。自2020年3月27日起,免费60天。它将在当前目录中生成csv数据文件。在

fromnextstep.getData.weatherimportweatherconfig={'frequency':1,'start_date':'01-Jan-2020','end_date':'31-Jan-2020','api_key':'your api key here','location_list':['singapore'],'location_label':False}weather(config).get_weather_data()

模型模块

每个ML模型都有一个独特的配置。请相应填写。在

随机森林

# examples, please fill in according to your project scopefromnextstep.model.random_forestimportrandom_forestconfig={'label_column':'USEP','train_size':0.9,'seed':66,'n_estimators':10,'bootstrap':True,'criterion':'mse','max_features':'sqrt'}random_forest_shell=random_forest(config)random_forest_shell.build_model(data)# build model

arima

fromnextstep.model.arimaimportarimaconfig={'lag':7,'differencing':0,'window_size':2,'label_column':'USEP','train_size':0.8,'seed':33}arima_shell=arima(config)arima_shell.autocorrelation(data)# plot autocorrelation to determine p, lag orderarima_shell.partial_autocorrelation(data)# plot partial autocorrelation to determine q, moving average widow sizearima_shell.build_model(data)# build model# residual plot to check model performancearima_shell.residual_plot()arima_shell.residual_density_plot()

贡献

欢迎拉取请求

作者

杨月松

朱伯林

杨紫月

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
java如何在数据库中插入行时自动发送电子邮件?   从进程输出读取的Java问题   java质疑StyledDocument和JTextPane之间的关系,以及接口的正确使用   java错误getPlayer(args[0]);   java如何使Spring引导在重新打包的WAR中包含清单文件?   Java中的除法与模   java使用2d数组和JfreeChart制作散点图   java扩展SonarQube FindBugs插件和自定义FindBugs插件   javaspring:hibernate+ehcache   具有不正确的equals和HashCode实现的java HashMap   java Jaspersoft报告网。旧金山。jasperreports。发动机例外:net。旧金山。jasperreports。发动机填满JRepressionEvalException:计算表达式时出错   java如果输入与其变量不匹配,如何添加错误   在java中使用简单数组[]实现队列   无法启动上下文路径/hsx上的java FAIL应用程序