位置: IT常识 - 正文

AI实战:用Transformer建立数值时间序列预测模型开源代码汇总(ai implementation)

编辑:rootadmin
AI实战:用Transformer建立数值时间序列预测模型开源代码汇总 用Transformer建立数值时间序列预测模型开源代码汇总

推荐整理分享AI实战:用Transformer建立数值时间序列预测模型开源代码汇总(ai implementation),希望有所帮助,仅作参考,欢迎阅读内容。

文章相关热门搜索词:ai实战教程,ai(illustrator),illustrated transformer,ai运用,ai implementation,ai实现,ai运用,ai运用,内容如对您有帮助,希望把文章链接给更多的朋友!

Transformer是一个利用注意力机制来提高模型训练速度的模型。,trasnformer可以说是完全基于自注意力机制的一个深度学习模型,因为它适用于并行化计算,和它本身模型的复杂程度导致它在精度和性能上都要高于之前流行的RNN循环神经网络。

记录一下Transformer做数值时间序列预测的一下开源代码

time_series_forcasting代码地址 https://github.com/CVxTz/time_series_forecastingTransformer-Time-Series-Forecasting

代码地址 https://github.com/nklingen/Transformer-Time-Series-Forecasting

Article: https://natasha-klingenbrunn.medium.com/transformer-implementation-for-time-series-forecasting-a9db2db5c820 szZack的博客

Transformer_Time_Series

代码地址 https://github.com/mlpotter/Transformer_Time_Series

论文地址: Enhancing the Locality and Breaking the Memory Bottleneck of Transformer on Time Series Forecasting (NeurIPS 2019) https://arxiv.org/pdf/1907.00235.pdf

Non-AR Spatial-Temporal Transformer

Introduction Implementation of the paper NAST: Non-Autoregressive Spatial-Temporal Transformer for Time Series Forecasting (submitted to ICML 2021).

We propose a Non-Autoregressive Transformer architecture for time series forecasting, aiming at overcoming the time delay and accumulative error issues in the canonical Transformer. Moreover, we present a novel spatial-temporal attention mechanism, building a bridge by a learned temporal influence map to fill the gaps between the spatial and temporal attention, so that spatial and temporal dependencies can be processed integrally.

论文地址:https://arxiv.org/pdf/2102.05624.pdf代码地址 https://github.com/Flawless1202/Non-AR-Spatial-Temporal-TransformerMultidimensional-time-series-with-transformer

Transformer/self-attention for Multidimensional time series forecasting 使用transformer架构实现多维时间预测

Rerfer to https://github.com/oliverguhr/transformer-time-series-prediction

代码地址 https://github.com/RuifMaxx/Multidimensional-time-series-with-transformer szZack的博客TCCT2021AI实战:用Transformer建立数值时间序列预测模型开源代码汇总(ai implementation)

Convolutional Transformer Architectures Complementary to Time Series Forecasting Transformer Models

Paper: TCCT: Tightly-Coupled Convolutional Transformer on Time Series Forecasting https://arxiv.org/abs/2108.12784

It has already been accepted by Neurocomputing:

Journal ref.: Neurocomputing, Volume 480, 1 April 2022, Pages 131-145

doi: 10.1016/j.neucom.2022.01.039

代码地址 https://github.com/OrigamiSL/TCCT2021-Neurocomputing-Time_Series_Transformers

Introduction This directory contains a Pytorch/Pytorch Lightning implementation of transformers applied to time series. We focus on Transformer-XL and Compressive Transformers.

Transformer-XL is described in this paper Transformer-XL: Attentive Language Models Beyond a Fixed-Length Context by Zihang Dai*, Zhilin Yang*, Yiming Yang, Jaime Carbonell, Quoc V. Le, Ruslan Salakhutdinov (*: equal contribution) Preprint 2018.

Part of this code is from the authors at https://github.com/kimiyoung/transformer-xl.

代码地址 https://github.com/Emmanuel-R8/Time_Series_Transformers

Multi-Transformer: A new neural network-based architecture for forecasting S&P volatility

Transformer layers have already been successfully applied for NLP purposes. This repository adapts Transfomer layers in order to be used within hybrid volatility forecasting models. Following the intuition of bagging, this repository also introduces Multi-Transformer layers. The aim of this novel architecture is to improve the stability and accurateness of Transformer layers by averaging multiple attention mechanism.

The article collecting theoretical background and empirical results of the proposed model can be downloaded here. The stock volatility models based on Transformer and Multi-Transformer (T-GARCH, TL-GARCH, MT-GARCH and MTL-GARCH) overcome the performance of traditional autoregressive algorithms and other hybrid models based on feed forward layers or LSTM units. The following table collects the validation error (RMSE) by year and model.

代码地址 https://github.com/EduardoRamosP/MultiTransformer

szZack的博客

一个很好的完整的例子

代码 https://github.com/OrigamiSL/TCCT2021-Neurocomputing- https://github.com/zhouhaoyi/Informer2020

parser = argparse.ArgumentParser(description='[Informer] Long Sequences Forecasting')parser.add_argument('--model', type=str, required=True, default='informer',help='model of experiment, options: [informer, informerstack, informerlight(TBD)]')parser.add_argument('--data', type=str, required=True, default='ETTh1', help='data')parser.add_argument('--root_path', type=str, default='./data/ETT/', help='root path of the data file')parser.add_argument('--data_path', type=str, default='ETTh1.csv', help='data file') parser.add_argument('--features', type=str, default='M', help='forecasting task, options:[M, S, MS]; M:multivariate predict multivariate, S:univariate predict univariate, MS:multivariate predict univariate')parser.add_argument('--target', type=str, default='OT', help='target feature in S or MS task')parser.add_argument('--freq', type=str, default='h', help='freq for time features encoding, options:[s:secondly, t:minutely, h:hourly, d:daily, b:business days, w:weekly, m:monthly], you can also use more detailed freq like 15min or 3h')parser.add_argument('--checkpoints', type=str, default='./checkpoints/', help='location of model checkpoints')parser.add_argument('--seq_len', type=int, default=96, help='input sequence length of Informer encoder')parser.add_argument('--label_len', type=int, default=48, help='start token length of Informer decoder')parser.add_argument('--pred_len', type=int, default=24, help='prediction sequence length')# Informer decoder input: concat[start token series(label_len), zero padding series(pred_len)]parser.add_argument('--enc_in', type=int, default=7, help='encoder input size')parser.add_argument('--dec_in', type=int, default=7, help='decoder input size')parser.add_argument('--c_out', type=int, default=7, help='output size')parser.add_argument('--d_model', type=int, default=512, help='dimension of model')parser.add_argument('--n_heads', type=int, default=8, help='num of heads')parser.add_argument('--e_layers', type=int, default=2, help='num of encoder layers')parser.add_argument('--d_layers', type=int, default=1, help='num of decoder layers')parser.add_argument('--s_layers', type=str, default='3,2,1', help='num of stack encoder layers')parser.add_argument('--d_ff', type=int, default=2048, help='dimension of fcn')parser.add_argument('--factor', type=int, default=5, help='probsparse attn factor')parser.add_argument('--distil', action='store_false', help='whether to use distilling in encoder, using this argument means not using distilling', default=True)parser.add_argument('--CSP', action='store_true', help='whether to use CSPAttention, default=False', default=False)parser.add_argument('--dilated', action='store_true', help='whether to use dilated causal convolution in encoder, default=False', default=False)parser.add_argument('--passthrough', action='store_true', help='whether to use passthrough mechanism in encoder, default=False', default=False)parser.add_argument('--dropout', type=float, default=0.05, help='dropout')parser.add_argument('--attn', type=str, default='prob', help='attention used in encoder, options:[prob, full, log]')parser.add_argument('--embed', type=str, default='timeF', help='time features encoding, options:[timeF, fixed, learned]')parser.add_argument('--activation', type=str, default='gelu',help='activation')parser.add_argument('--output_attention', action='store_true', help='whether to output attention in encoder')parser.add_argument('--do_predict', action='store_true', help='whether to predict unseen future data')parser.add_argument('--num_workers', type=int, default=0, help='data loader num workers')parser.add_argument('--itr', type=int, default=2, help='experiments times')parser.add_argument('--train_epochs', type=int, default=6, help='train epochs')parser.add_argument('--batch_size', type=int, default=16, help='batch size of train input data')parser.add_argument('--patience', type=int, default=3, help='early stopping patience')parser.add_argument('--learning_rate', type=float, default=0.0001, help='optimizer learning rate')parser.add_argument('--des', type=str, default='test',help='exp description')parser.add_argument('--loss', type=str, default='mse',help='loss function')parser.add_argument('--lradj', type=str, default='type1',help='adjust learning rate')parser.add_argument('--use_amp', action='store_true', help='use automatic mixed precision training', default=False)parser.add_argument('--inverse', action='store_true', help='inverse output data', default=False)parser.add_argument('--use_gpu', type=bool, default=True, help='use gpu')parser.add_argument('--gpu', type=int, default=0, help='gpu')parser.add_argument('--use_multi_gpu', action='store_true', help='use multiple gpus', default=False)parser.add_argument('--devices', type=str, default='0,1,2,3',help='device ids of multile gpus')

szZack的博客

数据集 https://github.com/zhouhaoyi/ETDataset
本文链接地址:https://www.jiuchutong.com/zhishi/288792.html 转载请保留说明!

上一篇:js表单验证密码(确认密码),密码长度至少8位,并且英文与数字组合(js表单验证代码)

下一篇:最小的触屏手机是什么(最小的触屏手机有哪些)

  • 二进制转十进制(二进制转十进制简单算法)

    二进制转十进制(二进制转十进制简单算法)

  • 山姆会员副卡怎么转给别人(山姆会员副卡怎么给别人)

    山姆会员副卡怎么转给别人(山姆会员副卡怎么给别人)

  • 抖音粉丝团灯牌怎么隐藏(抖音粉丝团灯牌怎么点亮)

    抖音粉丝团灯牌怎么隐藏(抖音粉丝团灯牌怎么点亮)

  • 华为matebook13充电无法开启怎么回事(华为matebook13充电充不进去)

    华为matebook13充电无法开启怎么回事(华为matebook13充电充不进去)

  • vivo手机录屏一卡一卡的(vivo手机录屏一小时不能录了)

    vivo手机录屏一卡一卡的(vivo手机录屏一小时不能录了)

  • 笔记本电脑电源指示灯不亮开机正常(笔记本电脑电源键一闪一闪无法开机)

    笔记本电脑电源指示灯不亮开机正常(笔记本电脑电源键一闪一闪无法开机)

  • 微信把你拉黑了还能加好友么(微信把你拉黑了还能看对方朋友圈吗?)

    微信把你拉黑了还能加好友么(微信把你拉黑了还能看对方朋友圈吗?)

  • 华为怎么设置两个系统桌面(华为怎么设置两个桌面)

    华为怎么设置两个系统桌面(华为怎么设置两个桌面)

  • 手机定时开关机软件(手机定时开关机在哪里设置)

    手机定时开关机软件(手机定时开关机在哪里设置)

  • 交管12123找回密码数据未知(交管12123找回密码收不到验证码)

    交管12123找回密码数据未知(交管12123找回密码收不到验证码)

  • 微信拉黑再删除和直接删除有区别吗(微信拉黑再删除后黑名单里也消失了)

    微信拉黑再删除和直接删除有区别吗(微信拉黑再删除后黑名单里也消失了)

  • 京东开通plus什么意思

    京东开通plus什么意思

  • 手机卡封停有什么后果(手机卡封了会自动注销吗)

    手机卡封停有什么后果(手机卡封了会自动注销吗)

  • 云储存是存到哪里去了(云存储?)

    云储存是存到哪里去了(云存储?)

  • 手机软件打不开(苹果手机软件打不开)

    手机软件打不开(苹果手机软件打不开)

  • 手机怎么把图片修圆角(手机怎么把图片变成jpg)

    手机怎么把图片修圆角(手机怎么把图片变成jpg)

  • 淘宝亲情账号怎么弄(淘宝亲情账号怎么取消)

    淘宝亲情账号怎么弄(淘宝亲情账号怎么取消)

  • 腾讯视频共享设备怎么添加(腾讯视频共享设备定位的信息准确吗)

    腾讯视频共享设备怎么添加(腾讯视频共享设备定位的信息准确吗)

  • 怎么双向清除聊天记录(怎么双向清除聊天记录微信)

    怎么双向清除聊天记录(怎么双向清除聊天记录微信)

  • 华为dubaloo什么型号(华为dubaloo什么价格)

    华为dubaloo什么型号(华为dubaloo什么价格)

  • GHOST手动还原重装系统详细教程(图文)(手动ghost还原硬盘)

    GHOST手动还原重装系统详细教程(图文)(手动ghost还原硬盘)

  • syslog介绍(二):Linux下syslog基本配置(syslog使用)

    syslog介绍(二):Linux下syslog基本配置(syslog使用)

  • 电梯安装费发票
  • 税务人员岗位有哪些
  • 稳岗补贴计入现金流量哪个科目
  • 营业收入是不是利润
  • 中标服务费计入什么会计科目
  • 退去年的教育费附加
  • 应交房产税通过应交税费核算吗
  • 利息股息红利所得个人所得税税率
  • 逾期抵扣办理申请书模板
  • 高薪技术企业研发人员人数
  • 城市维护建设税是什么意思
  • 企业买电动车做资产如何做折旧?
  • 佣金支付方式有哪几种
  • 农产品发票抵扣需要勾选吗
  • 普通发票计量单位没填
  • 国家级企业孵化器是什么意思
  • 节假日加班工资是平时的几倍?
  • 计提工资与发放工资
  • 置换补贴款
  • 收到的运输发票要交印花税吗?
  • 哪些发票公司可以抵扣
  • 研发阶段计入管理费用吗吗
  • 一般商业企业要缴纳哪些税?
  • 进口货物的企业有哪些
  • 如何让解决中世纪基督教世界黑暗
  • 社保增加人员网上申报
  • 租赁合同法律风险
  • 个体工商户与其经营者构成共同侵权吗
  • yii框架教程
  • 停止恶意软件删除怎么办
  • 在企业所得税前扣除的有哪些
  • 如何使用微信公交付款
  • 对外长期投资会计分录
  • laravel elementui
  • 什么是跨域以及跨境电商
  • php中自定义函数的语法格式
  • vue-axios详细介绍
  • 工作服计入什么明细科目
  • python如何提取字典中的键
  • 航天税盘服务费全额抵扣报税流程
  • 公司电脑配件也要交税吗
  • 工资为0需要申报个税吗
  • 劳务派遣公司账务处理
  • 公司对自己内部的要求
  • 员工出差预借差旅费属于
  • 可供出售交易性金融资产初始计量
  • 印花税不足一元免征吗
  • 营改增企业是什么意思
  • 工资社保医保计算
  • 汽车加油费属于交通费用吗
  • 因质量原因无法退货
  • 自产货物赠送客户账务处理
  • 小规模企业能否消化13点增值税普通发票
  • 房地产开发企业增值税税率
  • 建立索引mysql
  • dos下如何安装win7
  • hyper-v怎么样
  • window10升级不了
  • linux网络设备有哪些
  • win10系统桌面图标有白色方框的解决方法图...
  • JavaScript浏览器打开
  • unityrpg
  • webpack中CommonsChunkPlugin详细教程(小结)
  • 网页设计中css样式有何用途
  • python怎么输出日志
  • 将txt文件名批量导入excel
  • ie在支持ftp的功能方面
  • python进行aes解密
  • python自动生成
  • 容易混淆的词汇
  • python的params
  • js判断设备
  • java多线程编程实战指南
  • 总公司与分公司的法律责任
  • 企业自产自销农产品免税政策有哪些
  • 税控盘时间不对有影响吗
  • 国家税务局几号上班
  • 全国税收最高
  • 临沂学生医疗保险多少钱
  • 什么是免抵税额和免抵退税额
  • 免责声明:网站部分图片文字素材来源于网络,如有侵权,请及时告知,我们会第一时间删除,谢谢! 邮箱:opceo@qq.com

    鄂ICP备2023003026号

    网站地图: 企业信息 工商信息 财税知识 网络常识 编程技术

    友情链接: 武汉网站建设