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

adjust PatchTST into a classification mission. #773

Open
Valhir924 opened this issue May 17, 2023 · 5 comments
Open

adjust PatchTST into a classification mission. #773

Valhir924 opened this issue May 17, 2023 · 5 comments
Labels
ideas New ideas to enhance tsai

Comments

@Valhir924
Copy link

If I want to use PatchTST into a classification project, what else should I do if using tsai.
I've read the tutorials of PatchTST in a prediction work, I wonder if it is accustomed in TSclassifier.

@vrodriguezf
Copy link
Contributor

Out of the box that's not possible, you should change the head of the model (now the head is in the class FlattenHead or sth like that). Anyway, I'm not sure that the premises of PatchTST, especially channel independence, are the most appropriate for time series classification.

@Valhir924
Copy link
Author

Thanks for reply. : )
I'm considering the feasibility of premises too, still confused. Maybe I will try to change the head to verify it.
Yesterday I happened to read a similar issue about the dimension of output Y. The link is attached below.
[(https://github.com//issues/713#issuecomment-1481507146)]
#713
Oguiza mentioned that a plus version of PatchTST is under construction.
It's great. May I ask how the progress of the project is going?

@oguiza
Copy link
Contributor

oguiza commented Jul 1, 2023

Hi @Valhir924 ,
My exact comment was: "I'd like to develop a PatchTSTPlus model that allows to use it in scenarios like the one you described above.
This is the normal process that I've followed in the library. The standard version replicates as close as possible the model published in the paper/ code. And then a Plus version add additional functionality. Forecasting any # variables is one of those scenarios. Another one is Classification or Regression.
I'd like to work on this soon, but need to find the time or resources. Would you be interested in creating a PR? If your are interested I could you give you some direction on what needs to be done."
Unfortunately, nobody volunteered to collaborate on this, so it means that it's in the "wish list". No progress has been made, and there's no current timeline to add it.

@oguiza oguiza added the ideas New ideas to enhance tsai label Jul 1, 2023
@Valhir924
Copy link
Author

Valhir924 commented Jul 2, 2023

So sorry to hear that.
But anyway, thanks for reply and thank you for so much contribution so far.
: )

@benmfox
Copy link

benmfox commented Jul 20, 2023

Hi @oguiza, I think I can help with the PatchTSTPlus model. I saw in a related issue that you mentioned in addition to the head, the RevIN layer needs to be modified. I looked at the paper for RevIN, and it appears that it is used primarily for forecasting. Does the indicator revin simply need to be false for other tasks (i.e. classification)? I can imagine that changes in the mean and variance of time series data over time means something (from a classification perspective).

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

No branches or pull requests

4 participants