GithubHelp home page GithubHelp logo

Comments (3)

wuhaixu2016 avatar wuhaixu2016 commented on June 17, 2024

您好,感谢使用,不过我没有看懂您的使用方法,我觉得对于这种偏移现象,需要仔细检查一下temporal embedding是否正确。

from time-series-library.

kavinwow100 avatar kavinwow100 commented on June 17, 2024

你好这个问题解决了吗?我也出现明显偏移的情况:
用自己的数据尝试训练了itransformer 完成了Long-termForecasting任务,features为MS类型,数据间隔为每15分钟,freq设置为“t”,但是我在plot 项目result文件夹中的预测结果时,图像发生了偏移。详细如下,翻了历史的issue也对temporal embedding进行了调整发现仍然有这种问题。辛苦您能给我指点下问题,非常感谢。

plt.plot(trues[:,0,-1].reshape(-1)[-50:], label='GroundTruth')
plt.plot(preds[:,0,-1].reshape(-1)[-50:], label='Prediction')
image

如果对preds中结果进行人工偏移发现拟合的还不错,不知道问题出在哪里?
plt.plot(trues[:,0,-1].reshape(-1)[-50:], label='GroundTruth')
plt.plot(preds[:,0,-1].reshape(-1)[-49:], label='Prediction')
image

你好,我在进行长时预测(long_term_forecast)时,发现预测结果与真实值相比有偏移的现象。

我的数据是月度数据,目的是使用过去3个月的值去预测未来1个月值,即1_month_ahead,然后重新划分训练集,使用过去3个月的值去预测未来2个月的值,但是我仍只预测一个值,即跳过了未来一个月的值。在这种方案下,我设置最大预测6个月,训练6次,得到6次结果。(代码中seq_len=3, label_len=0, pred_len=1且固定,每次预测重新引入新参数pred_time_ahead并以此重新划分训练集)

在使用TimesNet,iTransformer,PatchTST等包含在库中的算法时,总是会出现结果偏移的现象而且偏移的距离随着预测时间的增加而变大(预测1个月时是1,预测6个月则偏差为6),但是我使用LSTM则没有这种现象,请问能提供任何可行的思路吗?

如下图是TimesNet在预测6个月时的结果对比: image 下图是LSTM在预测6个月时的结果对比: output5

from time-series-library.

Gczmy avatar Gczmy commented on June 17, 2024

你好这个问题解决了吗?我也出现明显偏移的情况:
用自己的数据尝试训练了itransformer 完成了Long-termForecasting任务,features为MS类型,数据间隔为每15分钟,freq设置为“t”,但是我在plot 项目result文件夹中的预测结果时,图像发生了偏移。详细如下,翻了历史的issue也对temporal embedding进行了调整发现仍然有这种问题。辛苦您能给我指点下问题,非常感谢。

plt.plot(trues[:,0,-1].reshape(-1)[-50:], label='GroundTruth')
plt.plot(preds[:,0,-1].reshape(-1)[-50:], label='Prediction')
image

如果对preds中结果进行人工偏移发现拟合的还不错,不知道问题出在哪里?
plt.plot(trues[:,0,-1].reshape(-1)[-50:], label='GroundTruth')
plt.plot(preds[:,0,-1].reshape(-1)[-49:], label='Prediction')
image

你好,我在进行长时预测(long_term_forecast)时,发现预测结果与真实值相比有偏移的现象。

我的数据是月度数据,目的是使用过去3个月的值去预测未来1个月值,即1_month_ahead,然后重新划分训练集,使用过去3个月的值去预测未来2个月的值,但是我仍只预测一个值,即跳过了未来一个月的值。在这种方案下,我设置最大预测6个月,训练6次,得到6次结果。(代码中seq_len=3, label_len=0, pred_len=1且固定,每次预测重新引入新参数pred_time_ahead并以此重新划分训练集)

在使用TimesNet,iTransformer,PatchTST等包含在库中的算法时,总是会出现结果偏移的现象而且偏移的距离随着预测时间的增加而变大(预测1个月时是1,预测6个月则偏差为6),但是我使用LSTM则没有这种现象,请问能提供任何可行的思路吗?

如下图是TimesNet在预测6个月时的结果对比: image 下图是LSTM在预测6个月时的结果对比: output5

试一下把模型代码forcast函数里的NSformer的normalization和de-nomalization注释掉有没有改善。作者在这个库里为大多数模型都添加了这个操作增强对非平稳序列的预测能力,但是对我的方法会有影响,我去掉之后偏移现象就好多了。

from time-series-library.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.