Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problems in generating final prediction #24

Open
Li-chen415 opened this issue Mar 23, 2024 · 2 comments
Open

Problems in generating final prediction #24

Li-chen415 opened this issue Mar 23, 2024 · 2 comments

Comments

@Li-chen415
Copy link

Dear Author:
Following the author's code, I found that the dimensions of the output data are (batch_size, pred_length, num__variates), but is it feasible to add a linear layer directly at the end of the pred_head module if there is ultimately only one prediction target? Or am I missing some parameter setting by the author?
Sincerely

@shazakam
Copy link

shazakam commented Apr 15, 2024

Hi @Li-chen415, are you saying you wish to only forecast on a single variate / feature but use all of them as inputs for the model?
If that is the case, I believe lucidrains implementation forecasts multiple tokens across all variates (as the paper and original implementation do). As you suggested adding a linear layer at the end is one way to go about forecasting on a single feature / variate which wouldn't be too difficult to do. However, you can also leave the model as is and ignore all the other outputs and use solely your desired variate output to optimise and backpropagate with. I hope this answers your question (Note: I haven't tried this implementation yet and just scanned quickly through it so this may be completely wrong)!

@ikhsansdqq
Copy link

Dear Author: Following the author's code, I found that the dimensions of the output data are (batch_size, pred_length, num__variates), but is it feasible to add a linear layer directly at the end of the pred_head module if there is ultimately only one prediction target? Or am I missing some parameter setting by the author? Sincerely

Dear @Li-chen415, I have tested iTransformer on my own by using @lucidrains iTransformer library and it works wonderfully. In my case, I am using a weather forecasting dataset. My suggestion is that you can manipulate like I did or even change the in-built iTransformer code as long as you understand the basics of Transformer as well as iTransformers. as you want or you can leave it as it is and just use it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants