## 3 Results and Discussion  
Results of the developed CNN are shown in Table 2 and visualized using the confusion matrices, as shown in Figures 3 and 5-7. In confusion matrices, non-white rows represent network output classes, and non-white columns correspond to real classes in Figures 3 and 5-7. The numbers/percentages of correctly classified images are shown on the diagonal. The last row represents the sensitivity, whereas the last column corresponds to the specificity. Overall accuracy is shown in the bottom-right field. The upper number in the non-white boxes corresponds to the number of images, and the lower number represents the percentage of the whole class database in the training or test set. In order to neglect the imbalance of classes of tumors in the database, we have also shown mean average precision, recall, and F1-score in Table 2. \begin{table}
\begin{tabular}{c c c c c c} \hline \multirow{2}{*}{**Division/Dataset**} & **Testing** & **Test Accuracy** & **Average** & **Average Recall** & **Average** \\  & **Approach** & **[\%]** & **Precision [\%]** & **[\%]** & **F1-Score [\%]** \\ \hline record-wise/the & _10_-fold & 95.40 & 94.81 & 95.07 & 94.93 \\ original dataset & One test & 97.39 & 95.44 & 96.94 & 96.11 \\ record-wise/the & _10_-fold & 96.56 & 95.79 & 96.51 & 96.11 \\ augmented dataset & One test & 97.28 & 97.15 & 97.82 & 97.47 \\ subject-wise/the & _10_-fold & 84.45 & 81.40 & 82.72 & 81.86 \\ original dataset & One test & 90.39 & 85.99 & 85.84 & 85.91 \\ subject-wise/the & _10_-fold & 88.48 & 86.48 & 87.82 & 86.97 \\ augmented dataset & One test & 91.84 & 83.94 & 82.18 & 81.78 \\ \hline \end{tabular}
\end{table} 
Table 2: Results from testing the network with _10_-fold cross-validation and one test, with two different cross-validation methods and different datasets. Figure 6 presents confusion matrices for the subject-wise _10_-fold cross-validation testing method for testing data obtained from the original dataset. The classification error for the testing set is 15.7%. This result shows that the network has a smaller accuracy than for record-wise cross-validation, which was expected because the predictions were made based on previously unseen data. Confusion matrices for the subject-wise _10_-fold cross-validation approach for testing data from the augmented dataset are shown in Figure 7. The classification error for the testing data is 11.5%. The proposed architecture of the CNN had only 4.3 million weights, and it obtained better results with augmented data, which was expected because the data set is not especially extensive. Even with the augmented data set, the subject-wise accuracy is lower than the accuracy obtained with the record-wise cross-validation because, with the augmentation, we only increased the number of images for individual patients, not the number of patients. As a consequence of splitting the data with the subject-wise method, increasing the number of patients was more important. The first class of tumors, meningioma, had the lowest sensitivity and specificity for all four testing methods. This is easily explained given that meningioma is the hardest to discern from the other two types of tumors based  
Figure 5: Confusion matrices for the augmented dataset with record-wise _10_-fold cross-validation for testing data. Figure 6: Confusion matrices for the original dataset with subject-wise _10_-fold cross-validation for testing data. on the place of origin and overall features. The execution speed was quite good with an average of less than 15 ms per image. Comparison with State-of-the-Art-MethodsThere are several papers that use the same database for brain tumor classification.