# Spam Email Detection Using Long Short-Term Memory and Gated Recurrent Unit
## 5 Model Results  
The model received a performance assessment through utilization of the defined metrics following training completion by measuring all vital classification metrics when evaluating the model's accuracy. These results establish complete metrics of model performance to identify correct classifications and determine prediction success across new unseen data. The metrics demonstrate how well the model detects positive cases and retains all required instances alongside its precise prediction accuracy, measuring its robust execution and dependable performance. Accuracy is the ratio of correctly predicted instances to the total instances. \[\text{Accuracy}=\frac{TP+TN}{TP+TN+FP+FN} \tag{1}\]  
According to the accuracy graph, (Figure 8) achieved 86% accuracy, while the validation reached 90%. The model demonstrates excellent generalization across data patterns because the accuracy values closely match. A consistent upward trend is visible for training and testing accuracy, while both lines remain closely aligned, which proves the model exhibits both robust and reliable characteristics. The Pointer Exception model successfully classifies unseen data because it demonstrates excellent accuracy on testing sets along with training sets and maintains minimal overfitting. This proves that the model is an ideal solution for classification tasks. Precision is the ratio of correctly predicted positive observations to the total predicted positives. Figure 8: Accuracy graph. \[\text{Precision}=\frac{TP}{TP+FP} \tag{2}\]  
The model in (Figure 9) shows its precision capabilities through its identification of positive cases relative to all properly classified positive outcomes. The model achieved 89% training precision and was validated with 90% precision in both measurements. The model demonstrates high precision in its positive predictions because it only produces a limited number of false positives. The matching precision values between training and validation data illustrate the model's ability to sustain high accuracy during training on unknown inputs, which indicates a strong ability to generalize and to be trusted in practical applications. Through precision measurement, the model proves its ability to separately categorize classes without many erroneous predictions. Recall is the ratio of correctly predicted positive observations to all observations in the actual class. \[Precision=\frac{TP}{TP+Fn} \tag{3}\]  
(Figure 10) demonstrates the recall metrics attained by the model, exhibiting a training recall rate of 82% and a validation recall rate of 84%. The graph illustrates the model's capability to capture positive instances among all actual positive instances accurately. The slightly higher recall in the validation set indicates the model's effectiveness in identifying positive cases in unseen data, contributing to its generalization and reliability. The consistency between training and validation recalls reflects the robustness of the model in maintaining its performance across different datasets. (Figure 11) illustrates the model's performance during both the training and validation phases, as evidenced by the assessment of loss values. The 0.46 training loss and 0.42 validation loss values show decreasing values throughout each training epoch. The training process reveals that the model is developing predictive accuracy through continuous learning. Evaluation of training and validation loss proximity indicates that the model produces effective generalization on new data applications while avoiding major model  
Figure 9: Precision metrics. degradation effects. Loss values decline as the model moves toward enhanced prediction capabilities, thus providing useful information for various predictive tasks including sales forecasting. Dropout regularization emerges as the reason why the validation curve exceeds the training curve because this technique operates during training and suppresses neuron activity.