Feature Importance Chart in Keras API
I am implementing a series of three deep learning models (RNN, 1D-CNN, and custom transformer), all utilizing the Keras API, for an NLP binary classification problem. I would like to generate a feature importance chart, similar to the one shown in the question linked here: Feature Importance Chart in neural network using Keras in Python
one_hot from Keras producing the same value for different words
I am using one_hot function from keras to convert my words into numbers. But for some reason it is producing the same number for different words. In the code below you can see 48 is used for “amazing” but 48 is also used for “too”. Why is that?