# Dementia Classification Using Deep Reinforcement Learning for Early Diagnosis
## 4 Experimental Results and Discussion
### Metrics Evaluation  
The accuracy, precision, recall, and F1-score of the model are considered as follows [35; 36; 37]:  
* _Accuracy:_ It is the most important statistic for determining how effective the model is at forecasting true negative and positive outcomes. Equation (8) is used to calculate the accuracy. \[Accuracy=\bigg{(}\frac{TP+TN}{TP+TN+FP+FN}\bigg{)}\] (8)  
_TP_ (true positives): Here, the model suggests that the image will be normal. _TN_ (true negatives): Here, the model assumes an aberrant image and the actual label confirms the prediction. _FP_ (false positives): In this, the model suggests a typical image, but the actual label is abnormal. _FN_ (false negatives): Here, the model forecasts an aberrant image but the actual label is normal. * Precision (_PR_), also called positive predictive value, is a value that belongs to [0, 1]. If the precision is equal to 1, the model is considered satisfactory. Precision is calculated using Equation (9). \[PR=\left(\frac{TP}{TP+FP}\right)\] (9) The recall (_REC_), also known as sensitivity, measures the classifier's ability to find all positive samples. Equation (10) is used to compute the recall. \[REC=\left(\frac{TP}{TP+FN}\right)\] (10) According to Equation (11), the _F1-score_ expresses the harmonic mean of precision and recall, which indicates how precision memory are matched. \[F1-Score=\left(\frac{2\times PR\times\ REC}{PR+REC}\right)\] (11)  
Figure 2 is a graph that depicts the training and validation curves for the proposed accuracy and AUC of DRL-XGBOOST. Owing to the overfitting and class imbalance issues, the training accuracy of the model is around 95%, whereas the validation accuracy is 94%. On the other hand, the model has the training AUC of approximately 98% and validation accuracy of 90%, as depicted in the above figures. Figure 3 is a graph that depicts the training and validation curves for the proposed DRL accuracy and AUC. Owing to the overfitting and class imbalance problem, the model's training accuracy is around 28%, and its validation accuracy is 26%. On the other hand, the model has the training AUC of approximately 56% and a validation accuracy of approximately 55%, as depicted in the above figures. Figure 4 depicts the confusion matrix (contingency table) that is utilized to differentiate the phases of dementia and predict AD. The confusion matrix displays the expected class alongside the classes of the four distinct groups of varying degrees of dementia. The confusion matrix depicts the training performance of the model. The computation is conducted for (i) 639 ND (Non-Demented) images, (ii) 635 VMD (Very Mild Denmented) images, (iii) 662 MD (Mild Denmented) images, and (iv) 624 MOD (Moderate Denmented) images. The confusion matrix is utilized to generate the class metrics presented in Table 3, which are derived from the individual class metrics. Table 3 displays the performance analysis of three different techniques, namely RL, DRL, and DRL-XGBOOST, based on their accuracy, precision, recall, and F1-score. DRL-XGBOOST with an accuracy of 90.23%, 92.34% of precision, 95.45% of recall, and 96.12% of F1-score outperforms the remaining two approaches. Figure 5 depicts the comparison of RL with the proposed approach graphically. \begin{table}
\begin{tabular}{c c c c c} \hline \hline
**Approach** & **Accuracy** & **Precision** & **Recall** & **F1-Score** \\ \hline Reinforcement Learning (RL) & 83.23 & 82.13 & 81.23 & 81.23 \\ \hline Deep Reinforcement Learning (DRL) & 84.34 & 83.45 & 82.12 & 80.23 \\ \hline DRL-XGBOOST & 90.23 & 92.34 & 95.45 & 96.12 \\ \hline \hline \end{tabular}
\end{table} 
Table 3: Performance analysis with different approaches. The performance indices of each class, including the ND, VMD, MD, and MOD classes, are presented in Table 4 according to their precision, recall, F1-score, and support. where MOD yields the highest precision value, followed by MD, VMD, and ND, respectively. Whereas the maximum recall value was found for ND, followed by VMD, MD, and MOD, respectively.