Closed lhq12 closed 2 years ago
Hi @lhq12 , pretraining is not needed. The embedding layer is just a module, so it should be a part of the model and should be trained with the model.
Could you clarify, please, is your question related to the rtdl
library or is it about one of the papers?
Yes, this is related to "Revisiting Deep Learning Models for Tabular Data". I am confused about the details of embedding categorical features, that is why I am here reading rtdl.
I still have a question, without pretraining, embeddings of those categories unseen at training stage are just random noises. Are there any tricks to handle this or we don't care about this?
unseen at training stage
This is an important detail :) I can think of several possible strategies, it depends on your specific problem what will work better:
"<RARE>"
and replace the least frequent categories with "<RARE>"
before the training. During evaluation, unseen categories should be replaced with the new "<RARE>"
category."<UNKNOWN>"
and replace categories during the training with "<UNKNOWN>"
with a probability unknown_rate
. During evaluation, unseen categories should be replaced with the new "<UNKNOWN>"
category. Ideally, unknown_rate
should be equal to the rate of unseen categories that you expect during evaluation.
Hi Yury,
Thank you for your excellent work. I get a problem when handling categorical features. Do I need to pre-train the embedding layer when applying it to the data processing or just to attach the embedding layer to the model and train it with the model.