Are there any examples of using Transformers for Time Series?
69 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Yeray
am 22 Dez. 2022
Beantwortet: Philip Brown
am 30 Mai 2024
Good afternoon All,
I'm researching how to develop/train/use Transformers (those similar to GPT) for S&P 500 historical data as an example. It seems like Transformers are mainly used for NLP but there are articles out there that utilize them for time series. Can any fellow lead the way in how could I get started in doing these in MATLAB? I have done general things like convolutions, LSTMs, etc. but not on a transformers caliber with the DL Toolbox.
I found this MATLAB package (pasted below) to be somewhat useful but it seems to lean more into language rather than historical data points.
Another side question: It's possibe to use the Deep Network Designer app to layout a transformers architecture?
Any tip is appreciated.
Thank you,
Yeray
0 Kommentare
Akzeptierte Antwort
Philip Brown
am 30 Mai 2024
Update in 2024: there's a GitHub repo/FileExchange submission and blog post covering using transformers for time series data which I think closely matches your request.
0 Kommentare
Weitere Antworten (1)
Sandeep
am 31 Aug. 2023
Bearbeitet: Sandeep
am 31 Aug. 2023
Hi Yeray,
Developing and training Transformers for time series data, such as S&P 500 historical data, is indeed possible. While Transformers are widely used in NLP tasks, they can also be applied to other domains, including time series analysis.
To get started, you can take a look at the following tips:
- Familiarize yourself with the basics of Transformers and their architecture. Understanding concepts like self-attention, multi-head attention, and positional encoding will be helpful.
- Explore the MATLAB package you found Transformer Models. Although it may be more focused on language tasks, you can still adapt it for time series analysis.
- Preprocess your S&P 500 historical data into a suitable format for training the Transformer model. You may need to consider factors such as input window size, target prediction horizon, and normalization.
- Train the Transformer model using your preprocessed data by adjusting the hyperparameters such as learning rate, batch size, and number of layers, to achieve optimal performance.
- Evaluate the trained model's performance on validation or test data using appropriate metrics for time series analysis, such as mean squared error (MSE) or mean absolute error (MAE).
- Remember that developing and training Transformers for time series analysis may require some experimentation and fine-tuning to achieve the desired results.
Hope you find it helpful. Good luck with your research!
0 Kommentare
Siehe auch
Kategorien
Mehr zu Sequence and Numeric Feature Data Workflows finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!