True positives and true negatives, F1 score: multi class classification
In a multiclass problem there is one score for each class, counting any other class as a negative. 

For example for class 1:


TP instances are gold standard class 1 predicted as class 1
FN instances are gold standard class 1 predicted as class 2,3 or 4
FP instances are gold standard class 2,3 or 4 predicted as class 1
TN instances are gold standard class 2,3 or 4 predicted as class 2,3 or 4 (here errors don't matter as long as class 1 is not involved)


In other words, the problem is evaluated as if it was a binary classification problem for every class individually. Doing the same process for every class independently (since the status of an instance depends on the target class), one obtains a different F1-score for each class.

After that, one generally calculates either the macro F1-score or the micro F1-score (or both) in order to obtain an overall performance statistic.