# Biomedical Image Classification via Dynamically Early Stopped Artificial Neural Network
## 4 Numerical Experiments
### Biomedical Image Classification
#### 4.2.2 Numerical Results  
In this section, we perform three different experiments. We firstly summarize the hyperparameters setting for the three compared approaches in view of the considerations made in the previous section. For the Original, ES and LRBS, we fixed \(\eta_{0}=10^{-2}\) and \(n_{0}=64\). The value of \(p\) is 20 for both the ES and LRBS. Moreover, the other hyperparameters defining the LRBS are set as \(c_{1}=0.5\), \(c_{2}=1\), \(dim=64\), \(\gamma=2\), \(p=20\) and \(\overline{p}=6\). In the following paragraphs, we present the results obtained by fixing the maximum number of epochs, _maxepochs_, to both 50 and 100. Results for OrganSMNIST in a Maximum Number of 50 Epochs  
In Table 6, we show the numerical results for the abdominal CT dataset: each column reports the mean accuracy on the test set, the standard deviation and the mean number of epochs obtained in five runs for the OrganSMNIST. The proposed method outperforms both the ResNet18 model and the early stopped one in terms of accuracy with the same number of epochs needed by the classical early stopping implementation. \begin{table}
\begin{tabular}{l c c c c} \hline \hline  & \multicolumn{2}{c}{\(\gamma=2\)} & \multicolumn{2}{c}{\(\gamma=4\)} \\ \cline{2-5}  & \(c_{1}=1/4\) & \(c_{1}=1/2\) & \(c_{1}=1/4\) & \(c_{1}=1/2\) \\ \hline \(c_{2}=2\), \(dim=0\) & \(92.46\%\pm 0.43\) & \(92.88\%\pm 0.3\) & \(92.46\%\pm 0.34\) & \(93.33\%\pm 0.24\) \\ \hline \(c_{2}=1\), \(dim=64\) & \(93.11\%\pm 0.35\) & \(93.18\%\pm 0.39\) & \(92.78\%\pm 0.37\) & \(92.93\%\pm 0.37\) \\ \hline \hline \end{tabular}
\end{table} 
Table 4: Mean and std. of the values of the accuracy obtained on MedMNIST2D OrganSMNIST dataset by the LRBS approach in a maximum of 50 epochs and different values of the hyperparameters. The initial mini-batch size is \(n_{0}=64\) and the initial learning rate is \(\eta_{0}=10^{-2}\). \begin{table}
\begin{tabular}{l c c c} \hline \hline
**Configuration** & **Test Accuracy (\%)** & \(\sigma\) (\%)** & **\# Epochs** \\ \hline Original & 91.43 & 1.03 & 50 \\ Early Stopping & 92.52 & 0.57 & 19 \\ LRBS & 92.40 & 0.24 & 17.8 \\ \hline \hline \end{tabular}
\end{table} 
Table 5: Results on MedMNIST2D OrganSMNIST dataset in a maximum number of 50 epochs. The AdaM optimizer is employed with \(\eta_{0}=10^{-3}\) and \(n_{0}=dim=64\). We also observed that if we left fixed the value for the MBS but we increase the initial learning rate by either one or two orders of magnitude, the LRBS method outperforms both the standard model and the early stopped version (see Table 7) by confirming the less dependence on the hyperparameters setting of the LRBS approach. Results for OCTMNIST Dataset in a Maximum Number of 50 Epochs  
The results related to the MedMNIST2D OCTMNIST dataset are illustrated in the same vein, but the means are calculated on the best five values of each configuration chosen from 20 runs; the numerical outcomes are presented in Table 8. It can be seen that the proposed method slightly improves the accuracy, but it reaches this value in half of the time with respect to the standard early stopping procedure. Results for OCTMNIST in a Maximum Number of 100 Epochs  
To highlight the effectiveness of Algorithm 1, another experiment has been conducted. We trained the same models presented in the previous section for a maximum number of 100 epochs by considering the dataset OCTMNIST (see Table 9). As in the previous experiments, comparable values for the accuracy can be obtained by all the considered strategies; however, the number of epochs related to the early stopped models is less than the 20% of the total number of epochs. However, we remark that the LRBS does not suffer from the computational expensive phase of the hyperparameters tuning. \begin{table}
\begin{tabular}{l c c c} \hline \hline
**Configuration** & **Test Accuracy (\%)** & \(\sigma\) (\%)** & **\# Epochs** \\ \hline Original & 92.80 & 0.22 & 50 \\ ES & 92.68 & 0.36 & 23.2 \\ LRBS & 92.81 & 0.37 & 23.2 \\ \hline \hline \end{tabular}
\end{table}