Bank Transaction Analytics & Fraud Detection

Dataset: PaySim mobile money transactions (Kaggle) · Pipeline: Spark SQL + Spark MLlib · Serving: MongoDB + FastAPI · Data source: …

1. Dataset overview

2. Which transaction types are affected?

3. When does fraud happen?

4. What do fraudulent transactions look like?

TRANSFER and CASH_OUT transactions only.

Transaction amount

Account balance behaviour

Destination accounts receiving repeated fraud (possible mule accounts)

5. Fraud detection model (Spark MLlib)

Random Forest – confusion matrix (test set)

Feature importance

Precision / recall vs alert threshold

Lowering the threshold raises more alerts. The curve is nearly flat between 0.2 and 0.7, so the default 0.5 is a reasonable operating point.

6. Flagged transactions (test set)

7. Check a transaction

Scores a single transaction with the trained Random Forest. The first request starts Spark and takes a few seconds.

Fill with: