# Patient-Tailored Dementia Diagnosis with CNN-Based Brain MRI Classification
## 3 Results
### Evaluation of the Diagnostic Ability of the CNN-Based Models
\begin{table}
\begin{tabular}{c c c c c c c c} \hline \hline  & & \multicolumn{6}{c}{**Classification Quality Metrics**} \\ \hline
**Model** & **Class** & **Precision** & **Recall** & **F1 Score** & **ACC** & **AUC** & **MCC** \\ \hline \multirow{4}{*}{Custom CNN 128} & AD & 100\% & 100\% & 100\% & 100\% & 1 & \\  & CN & 68\% & 85\% & 76\% & 85\% & 0.83 & \\  & MCI & 80\% & 60\% & 69\% & 60\% & 0.76 & \\  & Average & 83\% & 82\% & 81\% & 81.67\% & 0.86 & \\ \hline \multirow{4}{*}{Custom CNN 256} & AD & 100\% & 100\% & 100\% & 100\% & 1.00 & \\  & CN & 77\% & 92\% & 84\% & 91.7\% & 0.89 & \\  & MCI & 90\% & 73\% & 81\% & 73.3\% & 0.85 & \\  & Average & 89\% & 88\% & 88\% & 88.33\% & 0.91 & \\ \hline \multirow{4}{*}{Custom CNN 512} & AD & 100\% & 100\% & 100\% & 100\% & 1 & \\  & CN & 85\% & 97\% & 91\% & 96.7\% & 0.94 & \\ \cline{1-1}  & MCI & 96\% & 83\% & 89\% & 83.3\% & 0.91 & \\ \cline{1-1}  & Average & 94\% & 93\% & 93\% & 93.33\% & 0.95 & \\ \hline \multirow{4}{*}{Custom CNN 1024} & AD & 100\% & 100\% & 100\% & 100\% & 1 & \\  & CN & 88\% & 100\% & 94\% & 100\% & 0.97 & \\ \cline{1-1}  & MCI & 100\% & 87\% & 93\% & 86.7\% & 0.93 & \\ \cline{1-1}  & Average & 96\% & 96\% & 96\% & 95.56\% & 0.97 & \\ \hline \multirow{4}{*}{ResNet50-based} & AD & 100\% & 100\% & 100\% & 100\% & 1 & \\  & CN & 89\% & 95\% & 92\% & 95\% & 0.95 & \\ \cline{1-1}  & MCI & 95\% & 88\% & 91\% & 88.3\% & 0.93 & \\ \cline{1-1}  & Average & 95\% & 94\% & 94\% & 94.44\% & 0.96 & \\ \hline \multirow{4}{*}{Xception-based} & AD & 100\% & 100\% & 100\% & 100\% & 1 & \\  & CN & 94\% & 100\% & 97\% & 100\% & 0.98 & \\ \cline{1-1}  & MCI & 100\% & 93\% & 97\% & 93.3\% & 0.97 & \\ \cline{1-1}  & Average & 98\% & 98\% & 98\% & 97.78\% & 0.98 & \\ \hline \multirow{4}{*}{MobileNet-based} & AD & 100\% & 100\% & 100\% & 100\% & 1 & \\ \cline{1-1}  & CN & 95\% & 100\% & 98\% & 100\% & 0.99 & \\ \cline{1-1}  & MCI & 100\% & 95\% & 97\% & 95\% & 0.97 & \\ \cline{1-1}  & Average & 98\% & 98\% & 98\% & 98.33\% & 0.99 & \\ \hline \multirow{4}{*}{VGG16-based} & AD & 100\% & 100\% & 100\% & 100\% & 1 & \\ \cline{1-1}  & CN & 100\% & 100\% & 100\% & 100\% & 1 & \\ \cline{1-1}  & MCI & 100\% & 100\% & 100\% & 100\% & 1 & \\ \cline{1-1}  & Average & 100\% & 100\% & 100\% & 100\% & 1 & \\ \hline \hline \end{tabular}
\end{table} 
Table 4: Comparison of the classification quality metrics values assessing the performance of all the CNN-based models during testing. The MCC, which incorporates true and false positives and negatives into a single correlation metric and is particularly useful in multiclass contexts, showed a similarly strong performance, ranging from 73.27% to 100% across all the tested models. The VGG16-based model again achieved the maximum value here, indicating an ideal correlation between predicted and actual labels. AUC was calculated to assess the discriminative power of the models comprehensively. This metric provides insight into a model's ability to distinguish between classes across varying thresholds. Average AUC values ranged from 0.86 to 1.00, with five models (Custom CNN 1024, ResNet50-based, Xception-based, MobileNet-based, and VGG16-based) exceeding 0.95. The VGG16-based model achieved perfect AUC scores (1.00) for all classes. The values of the classification quality metrics revealed variability not only across different models but also among the image classes. The values of the metrics for the AD class were consistently perfect, with each model achieving 100% across all assessment categories (precision, recall, F1 score, accuracy, and AUC). Such flawless performance is rare in real-world scenarios, and the reasons for this outcome are unclear. One hypothesis is that the data for the AD class may have had lower variability, leading the models to overfit it. Alternatively, it is possible that the images belonging to the AD class possessed distinct and unique characteristics that were easily recognized and learned by the models, resulting in consistently accurate classification. All models performed well in the CN and MCI classes.