I was wondering if there was a simple solution to get recall and precision value for the classes of my classifier?
To put some context, I implemented a 20 classes CNN classifier using Tensorflow with the help of Denny Britz code : https://github.com/dennybritz/cnn-text-classification-tf .
As you can see at the end of text_cnn.py he implements a simple function to compute the global accuracy :
# Accuracy with tf.name_scope("accuracy"): correct_predictions = tf.equal(self.predictions, tf.argmax(self.input_y, 1)) self.accuracy = tf.reduce_mean(tf.cast(correct_predictions, "float"), name="accuracy")
Any ideas on how i could do something similar to get the recall and precision value for the differents categories?
Maybe my question will sound dumb but I'm a bit lost with this to be honest.