位置: 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表单验证代码)

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

  • 荣耀50一键锁屏怎么设置(荣耀50一键锁屏找不到了)

    荣耀50一键锁屏怎么设置(荣耀50一键锁屏找不到了)

  • 苹果手机双卡怎么发短信(苹果手机双卡怎么切换号码打电话)

    苹果手机双卡怎么发短信(苹果手机双卡怎么切换号码打电话)

  • 趣头条怎么提现(趣头条怎么提现不出来钱在什么地方)

    趣头条怎么提现(趣头条怎么提现不出来钱在什么地方)

  • 小红书ios下载不了(小红书为什么不能在苹果手机上下载)

    小红书ios下载不了(小红书为什么不能在苹果手机上下载)

  • 红米k20pro接电话黑屏(红米k20pro电话接听方式设置)

    红米k20pro接电话黑屏(红米k20pro电话接听方式设置)

  • 淘宝怎么加入阿里爱心助农平台(淘宝怎么加入阿里客服)

    淘宝怎么加入阿里爱心助农平台(淘宝怎么加入阿里客服)

  • v0lte通话是什么意思

    v0lte通话是什么意思

  • 苹果x屏幕放大了怎么恢复(苹果14pro屏幕放大了怎么办)

    苹果x屏幕放大了怎么恢复(苹果14pro屏幕放大了怎么办)

  • 苹果6s是什么基带(苹果6s是啥型号)

    苹果6s是什么基带(苹果6s是啥型号)

  • 华为p40pro开发者选项在哪里(华为p40pro开发者选项怎么设置)

    华为p40pro开发者选项在哪里(华为p40pro开发者选项怎么设置)

  • 发视频显示对方忙线中是怎么回事(发视频显示对方已拒绝是什么意思)

    发视频显示对方忙线中是怎么回事(发视频显示对方已拒绝是什么意思)

  • 抖音视频时间怎么延长(抖音视频时间怎么设置)

    抖音视频时间怎么延长(抖音视频时间怎么设置)

  • 闲鱼超赞怎么删掉(如何删除闲鱼的超赞)

    闲鱼超赞怎么删掉(如何删除闲鱼的超赞)

  • 微信朋友圈打开一条线是什么意思(微信朋友圈打开一条线中间一个点)

    微信朋友圈打开一条线是什么意思(微信朋友圈打开一条线中间一个点)

  • 抖音怎么解除限流(抖音怎么解除限制购买)

    抖音怎么解除限流(抖音怎么解除限制购买)

  • vivox27怎么设置微信铃声(vivox27怎么设置人脸识别解锁)

    vivox27怎么设置微信铃声(vivox27怎么设置人脸识别解锁)

  • 抖音评论被禁言要多久恢复(抖音评论被禁言了一般多久恢复正常)

    抖音评论被禁言要多久恢复(抖音评论被禁言了一般多久恢复正常)

  • 手机怎么出现耳机模式(手机怎么出现耳机标志)

    手机怎么出现耳机模式(手机怎么出现耳机标志)

  • 华为手机怎么扫描文件(华为手机怎么扫描图片成电子版)

    华为手机怎么扫描文件(华为手机怎么扫描图片成电子版)

  • 火山主播怎么解约公会(火山主播怎么解绑手机号)

    火山主播怎么解约公会(火山主播怎么解绑手机号)

  • vivox27自带微信美颜吗(vivo手机微信2怎么弄出来)

    vivox27自带微信美颜吗(vivo手机微信2怎么弄出来)

  • win10网络通但不能上网(win10网络正常但不能上网)

    win10网络通但不能上网(win10网络正常但不能上网)

  • win7桌面分屏设置(windows7分屏幕)

    win7桌面分屏设置(windows7分屏幕)

  • 热传导方程(热传导方程推导)

    热传导方程(热传导方程推导)

  • 王者荣耀电脑版怎么设置键位?设置成lol那样(王者荣耀电脑版操作)

    王者荣耀电脑版怎么设置键位?设置成lol那样(王者荣耀电脑版操作)

  • 个人独资企业需要监事吗
  • 运输服务属于生产劳务吗
  • 开票打印机可以自己买吗
  • 不动产租赁属于经营租赁吗
  • 个税系统添加不了新的单位
  • 营改增税负分析测算明细表一般由谁填写
  • 定额备用金补付会计分录怎么写?
  • 自查补交以前年度增值税怎么做账
  • 固定资产转售
  • 往来核算会计的岗位职责和工作内容
  • 股东变动及股东情况章节
  • 购进原材料没有发票怎么做分录
  • 企业个人完税证明怎么开
  • 企业会主动对税吗
  • 水果 增值税专票
  • 旅行社开具的发票是不都得写旅游服务
  • 购买软件可以退款吗
  • 电子承兑汇票支付信用查询
  • 预付帐款科目如何转平?
  • 接受捐赠固定资产存货等有相关凭据的其成本按什么确定
  • 不同的折旧方法对经济评价有什么影响
  • 固定资产清理汇算清缴如何反应
  • 符合条件的小微企业,减按20%
  • 发票勾选了是否就抵扣了
  • 私营公司可以构成单位犯罪吗
  • 积分兑换步骤
  • 设备安装服务费税收分类编码
  • 商誉减值会计准则
  • 桌面级cpu天梯图2023
  • NPFMSG.exe - NPFMSG是什么进程 有什么用
  • php抽象类使用场景
  • 房产契税什么时间缴纳
  • dotnetfx2.0
  • 苹果客服人工24小时
  • elements table
  • LangChain Agent 执行过程解析 OpenAI
  • 生产企业放假前的安全提示
  • 企业研发费用加计扣除最新政策
  • 记账凭证和收付账簿区别
  • tf fans club
  • 省外的发票能入账吗
  • 扣发工资是发还是不发
  • python设置配置文件
  • 发票待开是什么意思?
  • 报废产品需要入库吗
  • 小规模纳税人开票额度
  • 待处理财产损溢在资产负债表中填哪里
  • 垃圾袋发票税收分类编码
  • 劳务工资缴税标准
  • 法人股东 分红
  • 固定补贴是否属于社保
  • 母公司收取子公司利润
  • 企业收入确认的文章
  • 普通发票的后续怎么开
  • 内帐收入怎么确定
  • 水泥建材销售公司有哪些
  • 办理产权证费用明细
  • 提取法定盈余公积会计分录
  • 贴现利息高好还是低好
  • 企业应该设置的账薄
  • 账簿设置方法
  • ghost重装步骤
  • xp系统怎么强制结束进程
  • ubuntu搭建vsftp
  • ghost出现错误
  • linux内核的作用
  • retail版win10
  • ie浏览器怎么设置打开网页在同一个窗口
  • shell脚本用法
  • PreferenceActivity、PreferenceFragment使用
  • shell脚本实现文件移动、复制等操作
  • 苹果macos安装
  • nodejs esmodule
  • jquery dom对象
  • 查看项目层级结构怎么查
  • JavaScript电子时钟倒计时第二款
  • 安卓自定义app
  • 移动办税12366
  • 地税局基层税务工作总结
  • 目前长沙二手房出售信息
  • 免责声明:网站部分图片文字素材来源于网络,如有侵权,请及时告知,我们会第一时间删除,谢谢! 邮箱:opceo@qq.com

    鄂ICP备2023003026号

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

    友情链接: 武汉网站建设