Ensemble (Random Forest + Gradient Boosting + Logistic Regression) with SMOTE imbalance handling. Embedded model trained on synthetic data modeled after the Kaggle creditcard.csv — runs fully offline.
Credit-card fraud makes up less than 1% of real transaction streams. Run this project’s pure-NumPy SMOTE oversampler on a 200/40 legit/fraud sample and watch the minority class grow — plus see why that matters for fraud recall.
| Fraud recall | 93.94% |
| Fraud precision | 98.41% |
| Fraud F1 | 0.961 |
| Fraud AUC | 0.999 |
| Accuracy | 99.92% |
| Decision threshold | 0.68 |
| Test set size | 6000 (1.1% fraud) |
Metrics are computed on a held-out, naturally imbalanced (~1.1% fraud) test set from the synthetic generator, at the F1-tuned decision threshold. Fraud-class recall is the headline number here — missing a fraud charge costs more than a false alert.