# An Efficient Deep Learning Approach for Colon Cancer Detection
## 4 Results and Discussion  
The proposed method is tested on histopathological images collected from LC25000 dataset [21]. Python 3.7 is used in all simulations for histopathological images as well as for training datasets and testing datasets. The Cross-Entropy function was used during the training process to calculate the loss after a training iteration. In this work, we adopt accuracy, which is the most important performance measure, to analyze our scheme's generalization ability and classification performance. In addition, the confusion matrix is assumed to translate our binary classification according to True Positive (TP), False Positive (FP), True Negative (TN), and False Negative (FN). Moreover, recall, precision, and f1-score are computed to assess our results. The detailed definitions are given as follows [24]:  
\[\text{precision}=\frac{\text{TP}}{(\text{TP}+\text{FP})} \tag{1}\]  
\[\text{recall}=\frac{\text{TP}}{(\text{TP}+\text{FN})} \tag{2}\]  
\[\text{Accuracy}=\frac{(\text{TP}+\text{FN})}{(\text{TP}+\text{TN}+\text{FP}+ \text{FN})} \tag{3}\]  
\[\text{f1-score}=\frac{\text{TP}}{(\text{TP}+\frac{1}{2}(\text{FP}+\text{FN} ))} \tag{4}\]  
Figure 4: Data flow of our model. \[\text{SPE}=\frac{\text{TN}}{\text{TN}+\text{FP}} \tag{5}\] \[\text{MCC}=\frac{\text{TP}\times\text{TN}-\text{FP}\times\text{FN}}{ \sqrt{(\text{TP}+\text{FN})\times(\text{TN}+\text{FN})\times(\text{TP}+\text{FP })\times(\text{TN}+\text{FP})}} \tag{6}\]  
We tested the data using seven models and selected the best one to be our model. Table 1 shows a comparison between the seven models. In Table 1, we can find that the best model is model 7, which achieved the highest accuracy compared with other models. Therefore  
Figures 7-10 show the outputs from the considered convolutional layers and max pooling layers corresponding to a sample from the used dataset. We can observe that the deeper the model the more complex the features. As a result, more information can be extracted, which helps the detection process. \begin{table}
\begin{tabular}{c c c c c} \hline \hline
**Model** & **\# of Layer** & **Dropout Rate** & **Total Parameters** & **Accuracy** \\ \hline Model 1 & 14 & 0.5\% & 2,031,778 & 56\% \\ Model 2 & 16 & 0.5\% & 2,097,826 & 49.50\% \\ Model 3 & 10 & 0.5\% & 7,954,210 & 95.15\% \\ Model 4 & 12 & 0.8\% & 2,031,778 & 50.50\% \\ Model 5 & 10 & 0.8\% & 4,063,138 & 98.53\% \\ Model 6 & 14 & 0.8\% & 7,954,210 & 97.65\% \\
**Model 7** & **12** & **0.5\%** & **40,631,38** & **99.5\%** \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Comparison between the seven models (the best model with **bold**). \begin{table}
\begin{tabular}{c c c c c} \hline \hline
**Accuracy** & **Precision** & **Recall** & **F1-Score** & **SPE** & **MCC** \\ \hline
99.50\% & 99\% & 100\% & 99.49\% & 99\% & 99\% \\ \hline \hline \end{tabular}
\end{table} 
Table 2: The performance of the proposed model. Figure 6: Accuracy and loss curves for training data and validation data during 30 epochs. Figure 8: The output of the first Max pooling layer. Figure 7: The output of the first Convolutional layer. Figure 10: The output of the fourth Max pooling layer  
Figure 9: The output of the fourth Convolutional layer  
Figure 11 shows the distribution of the bias among the 30 epochs. We can observe that the proposed model reaches a zero bias at epoch 19 when the variance equals 0.0599. As a result, our model can fit the training data with low error on testing data, which reduces the overfitting and overcomes the underfitting problems. Colon cancer detection at the early stages of disease appearance using easy and cheap methods is a key requirement for the prudent application of control measures for this cancer. Therefore, the main goal of this study is to propose a new efficient method for the detection of colon cancer using an easy and cheap technique. The most common approaches for colon cancer detection are certain screening tests such as Sigmoidoscopy, and Colonoscopy.