# Deep Neural Networks for HER2 Grading of Whole Slide Images with Subclasses Levels
## 4 Results
Detailed remarks regarding the experiments conducted on each dataset are as follows:  
* DS0: The experiments for this dataset gave low sensitivity results for 1 and 2+ classes (the best are 0.84 for VGG in 1, and 0.82 for DenseNet in 2+). However, the negative class (0) is well classified by all methods (sensitivity ranges from 0.93 to 0.95). For class 3+, ResNet is able to get promising results (0.89 sensitivity) even though it is the class with fewer samples available. * DS1: With this augmented dataset, the performance is in general increased for the key classes in diagnosis (2+ and 3+). For 2+, the best results are shown by VGG (0.88 sensitivity) and DenseNet (0.85). However, the less complex models, such as Alexnet and GoogleNet, slightly degrade their performance. * DS2: This dataset, apart from spatial augmentation, also introduces colour variations with the Macenko method. The ResNet model increases its performance, but DenseNet consolidates as the best model for the 5-classes datasets, with an average sensitivity of 0.88 for these classes. Additionally, Table 8 shows the mean confidence values for the test set of the DS2 dataset using ResNet and DenseNet models. It shows that DenseNet classifies with a greater level of confidence. The confusion matrix for the experiment with this model is shown in Table 9, illustrating the performance of each class. The classification model's metrics, including sensitivity, specificity, precision, accuracy, F1-score, and Matthews Correlation Coefficient (MCC), are shown in Table 10.  
The DS3 dataset, consisting of 7 classes, has been generated using the prediction and confidence values obtained from the DenseNet-101 model applied to the DS2 dataset. Figure 5 illustrates the process. Once the DS3 dataset is generated, the experimentation process done is similar to the previous one. The idea behind this subdivision is to improve the performance for the most critical classes (2+ and 3+) since they are determinant for the diagnosis and treatment. The experiments demonstrated that ResNet and DenseNet remained the most effective networks. Specifically, when applied to this dataset, the performance of these two deep models exhibited significant improvement, their interpretation is provided below:  
* DS3: with this dataset, the novel 7-class approach is tested together with all the data augmentation proposed, that is spatial augmentation (rotations and flips) and colour variations. The ResNet model achieves the overall highest mean sensitivity for the experimentation with the highest confidence values (see Table 11). The confusion matrix for the experiment with the ResNet-101 model is shown in Table 12. This table shows the results for the proposed classes that have been trained to enhanced scoring for difficult patches (1.5 and 2.5+). The classification model's metrics, including sensitivity, specificity, precision, accuracy, F1-score, and MCC, are shown in Table 13. \begin{table}
\begin{tabular}{l l l l l l l} \hline \hline
**Class** & **Sensitivity** & **Specificity** & **Precision** & **Accuracy** & **F1-Score** & **MCC** \\ \hline
0 & 0.853 & 0.969 & 0.872 & 0.946 & 0.862 & 0.829 \\
1 & 0.844 & 0.969 & 0.870 & 0.944 & 0.857 & 0.822 \\
2+ & 0.913 & 0.970 & 0.885 & 0.959 & 0.899 & 0.873 \\
3+ & 0.933 & 0.987 & 0.947 & 0.976 & 0.940 & 0.925 \\ Back. & 0.971 & 0.984 & 0.938 & 0.981 & 0.954 & 0.943 \\ \hline \hline \end{tabular}
\end{table} 
Table 10: Metric values per class for DenseNet-201 applied to DS2 dataset with 5 classes. Figure 5: Generation of DS3 dataset with 7-classes using DenseNet-101 applied to DS2. Afterwards, the aggregation process is performed so that each cell in the confusion matrix is added to the corresponding class it is associated to (2+ for 1.5 and 3+ for 2.5+). This aggregation allows for the restoration of the scoring scheme for pathology diagnosis, which is based on 5 classes, and enables the evaluation of its effective performance.