timeseriesAI / tsai

Time series Timeseries Deep Learning Machine Learning Python Pytorch fastai | State-of-the-art Deep Learning library for Time Series and Sequences in Pytorch / fastai
https://timeseriesai.github.io/tsai/
Apache License 2.0
5.14k stars 643 forks source link

do you have code for multivariate classification datasets with categorical values ? #797

Open Sandy4321 opened 1 year ago

Sandy4321 commented 1 year ago

do you have code/data for multivariate classification datasets with categorical values ?

oguiza commented 1 year ago

Hi @Sandy4321, We've just added a multimodal module that you can use for this purpose. It's still experimental, but I've used it in several cases and it works. You can find more details here: https://timeseriesai.github.io/tsai/models.multimodal.html

norikazu99 commented 1 year ago

Hello, timeseriesAI is a great repo thanks for everything @oguiza. I am kind of lost on how to implement it. Should I make a ts_model and a tab_model and then use MultiInputNet to join (like in the docs under MultiInputNet)? Could you share a little example which you used? If there's a way but you don't have the code I wouldn't mind writing it and contribute it to tsai. I have a limited dataset and using cat embeddings would allow me to use all samples in a single model.

norikazu99 commented 1 year ago

After some time studying the code base and reproducing results, it seems to work just fine. The tests you provided are very well coded and commented. Thanks for everything you did

Sandy4321 commented 1 year ago

yes it seems to be something great inside , but not clear at all how to use it may you just share from 0 to end code example 0 read data from file 1 preprocess data 2 build model 3 predict 4 test performance

some clues https://github.com/nkafr/medium-article-tutorials/blob/main/TFT_Energy_Demand_Forecasting_Lightning_2_0.ipynb and https://towardsdatascience.com/temporal-fusion-transformer-time-series-forecasting-with-deep-learning-complete-tutorial-d32c1e51cd91

norikazu99 commented 1 year ago

I'd recommend you check https://timeseriesai.github.io/tsai/tutorials.html. You'll find everything you asked for in the notebooks, if not you'll find them in the docs. There are multiple ways to do each one of them, so it depends on your data, domain, etc..

oguiza commented 1 year ago

Thank you for your suggestions, @Sandy4321. But this would require additional contributors that we don't unfortunately have. I'll leave it open just in case anybody volunteers to add additional tutorials.