I have an LSTM model in Keras for categorical classification (20 possible categories). In many cases, my data can fit multiple categories.
Obviously, my current model uses one-hot encoding and fits on that - that gives me accuracy and validation rates in the 50-60% but I want to improve that by comparing how the model does against the top 3 categories that the algorithm chooses.
Right now, I use Keras with categorical_crossentropy. I presume that this checks to see if the label is the top match and bases the accuracy on that matching. How can I modify the fit/training of the model to allow the labeled category to be in the top 3 (or top X-number) of matches for the accuracy score?