# Patient-Tailored Dementia Diagnosis with CNN-Based Brain MRI Classification
## 3 Results
### Evaluation of the Diagnostic Ability of the CNN-Based Models
However, the latter posed the greatest classification challenge, which is likely to have been due to the inherent heterogeneity and overlapping imaging features of MCI subtypes. This complexity makes it difficult for the models to establish a consistent visual representation, affecting their ability to categorize MCI inputs accurately. Still, performance in relation to this class remained high, particularly for the Custom CNN 1024, Xception-based, MobileNet-based, and VGG16-based models, which achieved accuracy values of 86.7%, 93.3%, 95%, and 100%, respectively. The VGG16-based model achieved perfect performance, with classification quality scores reaching 100% across all evaluation metrics. Such results are uncommon in real-world scenarios and suggest that the model may have overfitted the data, potentially due to its shallow architecture with just 16 base layers. It could also imply that the model reached its maximum processing capacity and could not appropriately handle the higher dimensionality and complexity of the image features. The confusion matrices for all the CNN-based models exhibited a high frequency of true positive classifications in all three classes, as depicted in Figure 4. All ROC curves across different thresholds lean strongly toward the upper-left corner of the plot. Both of these observations indicate that the predictions the models yielded during testing were accurate and not random. Notably, the ROC curve for the AD class is ideal, positioned precisely in the upper-left corner of the plot. The models' performance regarding two other classes, CN and MCI, was still objectively satisfactory. Both corresponding ROC curves were similar and spatially close to each other across all plots. Among the custom-developed models, the Custom CNN 1024 performed best, reaching 100% ACC for AD and CN classes and achieving a micro- and macro-average AUC of 0.97, making it the top performer in this group. Within the group of the TL-based models, the VGG16-based model showed flawless performance across all classification quality metrics (precision, recall, F1 score, ACC, and AUC), without any misclassification. The Xception-based and MobileNet-based models also demonstrated outstanding results, achieving near-perfect ROC curves and micro-/macro-average AUC values of 0.98 and 0.99, respectively. Figure 4: _Cont._  
Comparing the confusion matrices and ROC curves of independently developed models with those of TL-based models, it was evident that the latter group performed slightly better. The average classification ACC of the TL-based models was very high. The AUC values were also consistently greater in the case of TL-based models. Overall, the inclusion of multiple varied evaluation metrics provides a comprehensive view of model performance. These results affirm that the CNN-based architectures, especially the TL-based ones, exhibit excellent potential in the automated classification of dementia-related neuroimaging data. Figure 4: Visualization of the testing performance of the selected CNN-based models using confusion matrices, ROC curves, and AUC scores: (**a**) Confusion matrix of the Custom CNN 128 model; (**b**) ROC curve plotted for the Custom CNN 128 model and the associated AUC scores; (**c**) Confusion matrix of the Custom CNN 1024 model; (**d**) ROC curve plotted for the Custom CNN 1024 model and the associated AUC scores; (**e**) Confusion matrix of the Xception-based model; (**f**) ROC curve plotted for the Xception-based model and the associated AUC scores; (**g**) Confusion matrix of the MobileNet-based model; (**h**) ROC curve plotted for the MobileNet-based model and the associated AUC scores; (**i**) Confusion matrix of the VGG16-based model; (**j**) ROC curve plotted for the VGG16-based model and the associated AUC scores.