# Automatic Approach for Brain Aneurysm Detection Using Convolutional Neural Networks
## 5 Evaluation and Results
Specificity is defined as the probability of a negative test result given that the individual is truly negative:  
\[TNR=\frac{TN}{FN+FP}. \tag{1}\]  
Sensitivity (also known as recall) is the probability of a positive test result, conditioned on the individual truly being positive:  
\[TPR=R=\frac{TP}{TP+FN}. \tag{2}\]  
The positive predictive value (also known as precision) is the proportion of positive results in statistic that are true positive:  
\[PPV=P=\frac{TP}{TP+FP}. \tag{3}\]  
The negative predictive value is the proportion of negative results in statistic that are negative:  
\[NPV=\frac{TN}{TN+FN}. \tag{4}\]  
F1 score is a machine learning evaluation metric that combines precision and recall scores, also known as F1-measure, or F1-score (it is used as a measure for model accuracy):  
\[F1=2\times\frac{P.R}{P+R}=2\times\frac{PPV.TPR}{PPV+TPR}. \tag{5}\]  
Accuracy is computed as  
\[ACC=\frac{TP+TN}{TP+FN+FP+TN}. \tag{6}\]  
Using these metrics, it is possible to evaluate the performance of the classifier and identify areas where it may be struggling. For example, if the classifier has low precision, it may be making too many false positive predictions. If the classifier has low recall, it may be missing too many actual positive examples. The training accuracy is the accuracy of the model on the training dataset. It measures how well the model is able to fit the training data and is computed by comparing the predicted outputs of the model to the true outputs of the training data. Validation accuracy, on the other hand, is the accuracy of the model on a separate validation dataset. The validation dataset is used to evaluate the performance of the model on unseen data, which is important to ensure that the model is not overfitting to the training data. During the training phase, the model is trained iteratively on the training dataset and the validation accuracy is computed after each iteration to monitor the model's performance on unseen data. The goal is to optimize the model's performance on the validation dataset, while avoiding overfitting to the training dataset. In general, the training accuracy tends to increase as the model is trained on more data and more epochs, while the validation accuracy can either increase or plateau and even decrease when the model starts overfitting. Therefore, monitoring both metrics during the training phase is important to ensure that the model is learning effectively and not overfitting to the training data. Figure 9 shows the training process of the proposed 2 DCNN model (blue line and orange line represent train accuracy and validation accuracy, respectively). We can see that at approximately 60 epochs, the model has reached its potential. Figure 10 shows the training process of the proposed 3 DCNN-ConvLSTM model. We can see that the proposed 3 DCNN-ConvLSTM model needed fewer epochs to reach its optimum. It also had a better ability to classify aneurysms than the 2 DCNN model. Figure 10: Training process of the proposed 3 DCNN-ConvLSTM model. (**a**) The train and validation accuracy. (**b**) The train and validation loss function. Figure 9: Training process of the proposed 2 DCNN model. (**a**) The train and validation accuracy. (**b**) The train and validation loss function. Tables 5 and 6 record the results of the two proposed models (2 DCNN model and 3 DCNN-ConvLSTM model). The main diagonal represents the true positive and true negative rates. The values outside the main diagonal represent the false positive and false negative detection error rates, as shown in Tables 5 and 6. We achieved similar results to [PERSON] et al. [16]. [PERSON] et al. used a 3D-CNN, while we only worked with a 2 DCNN, as shown in Table 7.  
From these values, we calculated various metrics for model evaluation and entered the results into \[TNR=\frac{TN}{FN+FP}. \tag{1}\]0 The first two columns represent the results of our proposed methods. The following columns represent the results of different authors who have solved similar aneurysm detection problems using several DNN models.