# Investigating the Performance of FixMatch for COVID-19 Detection in Chest X-rays
## 5 Exploratory Imbalance Analysis
### Results and Discussion
#### 5.2.2 Class-Wise Analysis  
In order to analyze the performance of the trained models further, the class-wise F1-scores of the various tests were computed and are displayed in Figures 6 and 7.  
Figure 5: Overall F1-score for varied labeled samples and 4 levels of imbalance.  
A number of interesting trends were revealed when examining this data. Firstly, we noticed that the COVID-19 class consistently outperforms the other classes and is generally seen to be extremely distinguishable by all the models, except in the extreme cases of \(5\%\) labeled data. This is rather promising, considering that the COVID-19 class is the class of interest in this case, given the recent outbreak of the pandemic. Indeed, a near-perfect score of 0.99 is seen when uniform data are used to train the model with 80% labeled data. This score remains rather consistent, even with lower proportions of labeled data, indeed, remaining as high as 0.93 in the case of 5% labeled data for the uniform distribution. While an expected drop in performance is noted for the different imbalance distributions, the overall F1-score generally remains high, thus confirming the viability of the process in detecting X-rays of persons infected with COVID-19. Such consistency in results across all imbalance distributions and percentages of labeled data is also noted in the case of the  
Figure 6: Class wise F1-score for varied labeled samples and 4 levels of imbalance.  
Figure 7: F1-scores of COVID-19 class for varied labeled samples and 4 levels of imbalance.  
lung opacity class, where F1-scores in the range of 0.7-0.8 are consistent across all tests. However, in the cases of the bacterial, normal and viral classes, a much greater amount of variability is observed in across the different distributions and proportions of labeled data. In order to understand these results, the PCA [72] and TSNE [73] dimensionality reduction techniques were applied to the dataset, and the results were plotted. Figure 8 shows the PCA results, and Figure 9 shows the TSNE results.  
This visualization reveals a number of interesting patterns. Firstly, the lung opacity class has a well-defined cluster in both the visualization types. It is perhaps due to this that the consistency of the F1-scores for this class is maintained despite the varying levels of imbalance and amounts of labeled data. Similarly, the COVID-19 class has a well-defined high-density cluster in the TSNE representation surrounded by areas of relatively low density, and this would clearly push the decision boundary around the COVID cluster, thereby accounting for the consistency and efficiency seen when identifying the COVID-19 class. A look at the TSNE representation reveals a high blend in the Bacterial and Viral classes that might be a factor in their failure to perform, as well as for the lower number of labeled samples. In both representations, the normal class is seen to have no defined cluster, with its data points scattered all over the representative space, therefore justifying its poor performance with respect to the other classes. Given these trends, it might be noteworthy to examine the variability in confusion matrices across the various imbalance distributions, as well as various amounts of unlabeled data in order to determine whether the same kinds of errors are made in each case.