# How to find performance metrics of a 3 class confusion matrix?

I need to evaluate various performance metrics like accuracy, specificity, sensitivity, recall rate, F score etc. My confusion matrix is as follows.

[[80, 5, 1], [16, 20, 0], [12, 1, 0]]

I'd like if someone could show me the formulae or a python program for calculating the same. Also, if you know any other metrics apart from these, please tell. I know how to calculate using formulae for a 2-class confusion matrix but I'm not sure for a 3-class matrix.

Accuracy can be easily calculated from the matrix by using diag sum / total.
Other metrics is really a one vs. rest (From wikipedia: strategy involves training a single classifier per class, with the samples of that class as positive samples and all other samples as negatives.)