# Generative Modeling for Imbalanced Credit Card Fraud Transaction Detection
## 5 Results and Discussion
Notably, GB and AB underperformed in precision (0.109075 and 0.053700) and F-measure (0.195008 and 0.101559), reflecting their challenges in balancing false positives and false negatives. Overall, ensemble models--particularly RF, XGB, and ANN--outperformed other approaches, demonstrating their effectiveness in handling class imbalance when combined with SMOTE. Simpler models like LR, NB, and boosting methods exhibited lower precision and F-measure, making them less suitable for datasets with imbalanced classes. The bar plots in Figure 11, representing the model performance metrics with SMOTE, showcase the accuracy, specificity, sensitivity, precision, F-measure, and G-mean of different classifiers. Random Forest (RF) stands out with consistently high values across all metrics, particularly in accuracy and specificity, emphasizing its effectiveness in detecting both fraudulent and non-fraudulent transactions. XGB and ANN also display solid performances, particularly in accuracy, specificity, and sensitivity, making them reliable choices for fraud detection. On the other hand, models like Naive Bayes (NB), AdaBoost (AB), and Logistic Regression (LR) show significant discrepancies, with low precision and F-measure, indicating challenges in identifying fraudulent transactions accurately. Likewise, K-Nearest Neighbors (KNN) and Gradient Boosting (GB) show a balance in their metrics, particularly in sensitivity, though their precision and F-measure could be improved. Overall, the plot \begin{table}
\begin{tabular}{c c c c c c c} \hline \hline
**Model** & **Accuracy** & **Specificity** & **Sensitivity** & **Precision** & **F-Measure** & **G-Mean** \\ \hline LR & 0.973409 & 0.973484 & 0.926471 & 0.052764 & 0.099842 & 0.949686 \\ DT & 0.997425 & 0.997820 & 0.750000 & 0.354167 & 0.481132 & 0.865081 \\ RF & 0.999555 & 0.999766 & 0.867647 & 0.855072 & 0.861314 & 0.931367 \\ GB & 0.987922 & 0.988031 & 0.919118 & 0.109075 & 0.195008 & 0.952952 \\ XGB & 0.999274 & 0.999496 & 0.860294 & 0.731250 & 0.790541 & 0.927287 \\ LGBM & 0.998432 & 0.998640 & 0.867647 & 0.504274 & 0.637838 & 0.930842 \\ KNN & 0.997729 & 0.997890 & 0.897059 & 0.403974 & 0.557078 & 0.946132 \\ NB & 0.975808 & 0.975957 & 0.882353 & 0.055274 & 0.104031 & 0.927976 \\ AB & 0.973702 & 0.973765 & 0.933824 & 0.053700 & 0.101559 & 0.953585 \\ BC & 0.998888 & 0.999191 & 0.808824 & 0.614525 & 0.698413 & 0.898982 \\ ANN & 0.999204 & 0.999402 & 0.875000 & 0.700000 & 0.777778 & 0.935135 \\ LSTM & 0.997683 & 0.997902 & 0.860294 & 0.395270 & 0.541667 & 0.926547 \\ RNN & 0.975212 & 0.975324 & 0.904412 & 0.055206 & 0.104061 & 0.939199 \\ \hline \hline \end{tabular}
\end{table} 
Table 8: Model performance metrics with SMOTE. indicates that RF, XGB, and ANN are the top performers, while models like Naive Bayes and AdaBoost need further optimization for better fraud detection. Table 9 presents the performance metrics of various machine learning models using the Adaptive Synthetic (ADASYN) sampling technique to address class imbalance. Among the models, Random Forest (RF) achieved the highest overall performance, with a sensitivity of 0.845588, a precision of 0.864662, and an F-measure of 0.855019, indicating a strong ability to accurately classify both the majority and minority classes. XGB also performed well, with a sensitivity of 0.889706 and an F-measure of 0.793443, reflecting its effectiveness in handling the ADASYN-augmented dataset. LGBM followed closely, achieving a sensitivity of 0.904412 and a G-mean of 0.950063, though its lower precision (0.421233) resulted in a lower F-measure (0.574766). Neural network models exhibited competitive performance, with the Artificial Neural Network (ANN) achieving a sensitivity of 0.875000 and an F-measure of 0.772727, while the LSTM model showed a sensitivity of 0.882353 and an F-measure of 0.603015. In contrast, RNN performed less effectively, with a lower sensitivity (0.838235) and an F-measure (0.173780), indicating its struggles in capturing the patterns of the ADASYN-enhanced data.