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.07k stars 633 forks source link

The sample in the document does not seem to be clear about how tsai conducts the complete training process of Tabular Model. The sample only gives the most basic practice #688

Open mtl121 opened 1 year ago

mtl121 commented 1 year ago

I feel that the document is a little too simple. I can only run the following simple code now. How do I divide the training set, verification set, and test set, and what the dls contains, parameters, and training process? I feel a little confused when I first see this document procs I see that the sample is filled with three value [Categorify, FillMissing, Normalize],But these three do not seem to be variables because there is no definition in the sample. What does that mean. And A similar problem is that I don't know where to add the splits defined in the code and what role they play

`procs = [] # 预处理操作列表,包括填充缺失值、标准化、类别编码等 y_names = ['result'] # 标签列名 df = pd.read_csv("./GfG.csv")

device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')

splits = RandomSplitter(valid_pct=0.2)(range_of(df)) dls = TabularDataLoaders.from_csv('./GfG.csv', y_names=y_names, cat_names = cat_names, cont_names = cont_names, procs = [Categorify, FillMissing, Normalize])

model = TabTransformer(dls.classes, dls.cont_names, dls.c) learn = Learner(dls, model) learn.fit_one_cycle(10, 1e-4)`

oguiza commented 1 year ago

Hi @mtl121, Could you please clarify which document you are referring to?

mtl121 commented 1 year ago

It doesn't point to which page, for example, the tabular model in the document's tabular model. If I use the GatedTabTransformer model of tsai to train the tabular data now, I can't start at all. The reason why I can't start is that I don't see a very complete training process from the document, and the document doesn't give a more detailed comment to the parameters of the model, Moreover, the sample given on Tabmodel's page is so simple that I can't use tsai to complete a table data task quickly

oguiza commented 1 year ago

Hi @mtl121, I'm planning to add a tutorial nb demonstrating how to use tabular models in tsai. In the meantime, I have created a gist to demonstrate how you can use tabular models in tsai. I hope you'll find it useful.

mtl121 commented 1 year ago

this is a good idea, so , this function need how long time can i see it

oguiza commented 1 year ago

I don't know. I cannot commit to any date. But if you have any questions in the meantime that are not covered in the gist I've just shared with you, create a new issue or open a discussion thread in "Discussions". If the gist provided answers your initial question, you can close this issue.