FNet模型实现滚动长期预测并可视化结果,定制化数据集进行预测

上传者: java1314777 | 上传时间: 2024-06-22 10:52:13 | 文件大小: 581KB | 文件类型: ZIP
本博客将介绍一种新的时间序列预测模型——FNet它通过使用傅里叶变换代替自注意力机制,旨在解决传统Transformer模型中的效率问题。FNet模型通过简单的线性变换,包括非参数化的傅里叶变换,来“混合”输入令牌,从而实现了快速且高效的处理方式。这种创新的方法在保持了相对较高的准确性的同时,显著提高了训练速度,特别是在处理长序列数据时更显优势。FNet的工作原理,并通过一个实战案例展示如何实现基于FNet的可视化结果和滚动长期预测。预测类型->多元预测、单元预测、长期预测。适用对象->受硬件所限制的时候,FNet是一种基于Transformer编码器架构的模型,通过替换自注意力子层为简单的线性变换,特别是傅里叶变换,来加速处理过程。FNet架构中的每一层由一个傅里叶混合子层和一个前馈子层组成(下图中的白色框)。傅里叶子层应用2D离散傅里叶变换(DFT)到其输入,一维DFT沿序列维度和隐藏维度。总结:FNet相对于传统的Transformer的改进其实就一点就是将注意力机制替换为傅里叶变换,所以其精度并没有提升(我觉得反而有下降,但是论文内相等,但是从我的实验角度结果分析精度是有下降的

文件下载

资源详情

[{"title":"( 38 个子文件 581KB ) FNet模型实现滚动长期预测并可视化结果,定制化数据集进行预测","children":[{"title":"layers","children":[{"title":"TransformerBlocks.py <span style='color:#111;'> 5.20KB </span>","children":null,"spread":false},{"title":"Projection.py <span style='color:#111;'> 745B </span>","children":null,"spread":false},{"title":"Invertible.py <span style='color:#111;'> 3.22KB </span>","children":null,"spread":false},{"title":"Embedding.py <span style='color:#111;'> 4.83KB </span>","children":null,"spread":false},{"title":"__pycache__","children":[{"title":"Invertible.cpython-39.pyc <span style='color:#111;'> 3.69KB </span>","children":null,"spread":false},{"title":"FNet.cpython-39.pyc <span style='color:#111;'> 2.09KB </span>","children":null,"spread":false},{"title":"Embedding.cpython-39.pyc <span style='color:#111;'> 6.50KB </span>","children":null,"spread":false},{"title":"Projection.cpython-39.pyc <span style='color:#111;'> 1.20KB </span>","children":null,"spread":false},{"title":"TransformerBlocks.cpython-39.pyc <span style='color:#111;'> 5.26KB </span>","children":null,"spread":false}],"spread":true},{"title":"FNet.py <span style='color:#111;'> 1.54KB </span>","children":null,"spread":false}],"spread":true},{"title":"main.py <span style='color:#111;'> 11.58KB </span>","children":null,"spread":false},{"title":"data","children":[{"title":"ETTh1-Test.csv <span style='color:#111;'> 48.39KB </span>","children":null,"spread":false},{"title":"ETTh1.csv <span style='color:#111;'> 2.47MB </span>","children":null,"spread":false}],"spread":true},{"title":".idea","children":[{"title":"FNet.iml <span style='color:#111;'> 327B </span>","children":null,"spread":false},{"title":".name <span style='color:#111;'> 4B </span>","children":null,"spread":false},{"title":"workspace.xml <span style='color:#111;'> 18.96KB </span>","children":null,"spread":false},{"title":"misc.xml <span style='color:#111;'> 288B </span>","children":null,"spread":false},{"title":"inspectionProfiles","children":[{"title":"Project_Default.xml <span style='color:#111;'> 1.34KB </span>","children":null,"spread":false},{"title":"profiles_settings.xml <span style='color:#111;'> 174B </span>","children":null,"spread":false}],"spread":true},{"title":"modules.xml <span style='color:#111;'> 267B </span>","children":null,"spread":false},{"title":".gitignore <span style='color:#111;'> 50B </span>","children":null,"spread":false},{"title":"aws.xml <span style='color:#111;'> 304B </span>","children":null,"spread":false}],"spread":true},{"title":"results.png <span style='color:#111;'> 59.07KB </span>","children":null,"spread":false},{"title":"requirements.txt <span style='color:#111;'> 1.24KB </span>","children":null,"spread":false},{"title":"models","children":[{"title":"predict-FNet-data-ETTh1","children":[{"title":"model.pth <span style='color:#111;'> 69.16KB </span>","children":null,"spread":false}],"spread":true}],"spread":true},{"title":"__pycache__","children":null,"spread":false},{"title":"util","children":[{"title":"decomposition.py <span style='color:#111;'> 1.52KB </span>","children":null,"spread":false},{"title":"metrics.py <span style='color:#111;'> 361B </span>","children":null,"spread":false},{"title":"masking.py <span style='color:#111;'> 831B </span>","children":null,"spread":false},{"title":"data_loader.py <span style='color:#111;'> 8.08KB </span>","children":null,"spread":false},{"title":"timefeatures.py <span style='color:#111;'> 3.65KB </span>","children":null,"spread":false},{"title":"tools.py <span style='color:#111;'> 3.59KB </span>","children":null,"spread":false},{"title":"__pycache__","children":[{"title":"timefeatures.cpython-39.pyc <span style='color:#111;'> 5.18KB </span>","children":null,"spread":false},{"title":"tools.cpython-39.pyc <span style='color:#111;'> 3.86KB </span>","children":null,"spread":false},{"title":"decomposition.cpython-39.pyc <span style='color:#111;'> 2.18KB </span>","children":null,"spread":false},{"title":"data_loader.cpython-39.pyc <span style='color:#111;'> 6.49KB </span>","children":null,"spread":false},{"title":"data_factory.cpython-39.pyc <span style='color:#111;'> 994B </span>","children":null,"spread":false}],"spread":false},{"title":"data_factory.py <span style='color:#111;'> 1.19KB </span>","children":null,"spread":false}],"spread":true},{"title":"results","children":[{"title":"OT-ForecastResults.csv <span style='color:#111;'> 15.05KB </span>","children":null,"spread":false}],"spread":true}],"spread":true}]

评论信息

免责申明

【只为小站】的资源来自网友分享,仅供学习研究,请务必在下载后24小时内给予删除,不得用于其他任何用途,否则后果自负。基于互联网的特殊性,【只为小站】 无法对用户传输的作品、信息、内容的权属或合法性、合规性、真实性、科学性、完整权、有效性等进行实质审查;无论 【只为小站】 经营者是否已进行审查,用户均应自行承担因其传输的作品、信息、内容而可能或已经产生的侵权或权属纠纷等法律责任。
本站所有资源不代表本站的观点或立场,基于网友分享,根据中国法律《信息网络传播权保护条例》第二十二条之规定,若资源存在侵权或相关问题请联系本站客服人员,zhiweidada#qq.com,请把#换成@,本站将给予最大的支持与配合,做到及时反馈和处理。关于更多版权及免责申明参见 版权及免责申明