How to Combine tfidf with LSTM in keras?
I am classifying emails as spam or ham using LSTM and some of its modified form(by adding constitutional layer at the end). For converting documents into vectors I am using keras.text_to_sequences
function.
But now I want to use TfIdf with the LSTM can anyone tell me or share the code how to do it. Please also guide me if it is possible and good approach or not.
If you are wondering why I would like to do this there are two reasons:
- I want to see if this improves the results.
- Second, my professor asked me to perform Latent Dirichlet Allocation, and use same features for both of the tasks.
Category Data Science