I have a text classification model that I have developed based off the tutorial located here: https://www.tensorflow.org/tutorials/keras/text_classification
I am using my own dataset. Each file contains metadata for a file of interest. I am trying to get the model to classify it as either a target or as ignorable.
Currently, the model returns a single value array probability score. If score > .5 then the file is a target. If it is less than .5 it is ignorable. I want to explain predictions using the Explainable AI module LIME, but lime needs model.predict() to return a set of probabilities for each potential category, as such I need an array [x,y] where x = ignorable probability and y = target probability and x +y = 1.
Can someone please explain how to modify the tutorial code to return the probabilities of both target and ignorable? Any assistance would be most appreciated 😀
submitted by /u/an_anonymous_mate
[visit reddit] [comments]