# Optimal Histopathological Classification Factors for Deep Learning-Based Breast Cancer Prediction
## 5 Results
### Training Loss and Validation Loss  
As described in Section 3.2.2, the training and validation loss function is usually used to evaluate the performance of a model on a hold-out set (validation portion). The created model has low training and validation loss, as shown in Figure 6B. Small training and validation losses indicate that the model has a soft overfitting problem and can be generalized to predict future events (cases) with acceptable accuracy. As stated earlier, 1736 samples are used for performance evaluation (testing). After applying image preprocessing, the testing sample was randomly selected from the BreakHis dataset. The selected sample contains 792 benign and 944 malignant cases. Using the results from the testing phase, the model was also evaluated using precision, recall, and F1-score  
Figure 5: Configuration of learning phase. Figure 6: Model performance. (**A**) ROC. (**B**) Training and validation loss. performance metrics, as shown in Table 2. The model scores slightly better at predicting cancerous cases than when predicting normal ones. The calculations of these performance matrices are introduced in Section 3.2.3. Figure 7A depicts the number of times the model predicts correctly and incorrectly. Based on the results shown in Figure 7A, the model has a 90% accuracy level as it correctly predicts 1558 out of 1736 testing samples. The confusion matrix, depicted in Figure 7B, exhibits greater detail about model performance; it indicates the number of correct and incorrect classifications and the number of times each class was confused with another. From the confusion matrix, 80 normal samples were predicted as cancerous, and 98 cancerous samples were predicted as normal. It also shows that the prediction accuracy percentage, in terms of normal predictions, is \(\dfrac{712}{792}=0.89\), while, in terms of cancerous predictions, it is \(\dfrac{846}{944}=0.89\). As remarked throughout this study, the aim is to study the impact of distinct magnification factors of the histopathological image on model accuracy. The aim is to decide which magnification factor assists the model in achieving the best learning rate. The number of histopathological images for the testing dataset and the combined training and validation dataset is shown in Figure 8A,B. The numbers from Figure 8A,B indicate that no skewing problem is present and that the model is equally exposed to almost comparable numbers of magnification factors during the training and testing phases. The goal at this point is to determine which magnification factor helped the model understand the structure of cancerous or non-cancerous cells more clearly. Which magnification factor, in other words, is characterized as good data, and which one represents noisy data? As accuracy will increase if we only train on the one with more informative features, it is advantageous to use the proper magnification factor that has the most informative features. \begin{table}
\begin{tabular}{c c c c} \hline  & **Precision** & **Recall** & **F1-Score** \\ \hline Normal & 0.88 & 0.9 & 0.89 \\ \hline Cancer & 0.91 & 0.9 & 0.9 \\ \hline \end{tabular}
\end{table} 
Table 2: Normal and cancer prediction accuracy using various classification matrices. Figure 7: Overall prediction accuracy. (**A**) Cancerous class prediction. (**B**) Confusion matrix. After prediction, the testing dataset is separated into four distinct datasets, each representing one magnification factor; one dataset for each magnification factor. The confusion matrices for the four distinct magnification factor datasets are shown in Figure 9. From the shown results, it is clear that, at magnifications of 200x and 400x factors, the model performed better in achieving fewer false-positive and false-negative detections. Figure 8: Number of magnification factors in the training and testing dates. (**A**) Training dataset. (**B**) Testing dataset. Figure 9: Confusion matrix for the four different magnification factors. (**A**) 40x. (**B**) 100x. (**C**) 200x. (**D**) 400x.