Explainable fraud detection

IT 599 Capstone · Walsh College · Fall 2025

Explainable fraud detection

A transparent risk score for digital payments, trained and cross-validated live on her 5,000-transaction synthetic dataset, with a threshold you control and a per-transaction explanation.

ExcelPythonLogistic regressionCross-validationExplainabilitySynthetic data
-synthetic payment transactions ()
-labelled fraud, a rate of
-accuracy of always answering "legit", the baseline to beat
-out-of-fold ROC AUC of the risk model (0.5 = coin flip)

Live demo

Every transaction gets a risk score from a model that never saw it during training (5-fold cross-validation). Move the threshold to trade review workload against missed fraud.

-transactions flagged
-recall: fraud caught
-precision: flags that are fraud
-accuracy

Cost at this threshold

Highest-risk transactions

Click a row to explain it. Scores are out-of-fold, so each one comes from a model trained without that transaction.

Why this score

Results

With only 18 fraud cases, one more or one fewer caught fraud moves recall by 5.6 points. Treat every figure here as fragile.

Precision and recall across thresholds

What the model learned (all 5,000 rows)

Standardized coefficients in log-odds per one standard deviation (binary flags too). Positive values push a transaction toward fraud. Country effects are relative to the United States, channel effects relative to Mobile.

How stable is the evaluation?

Re-running cross-validation with different fold seeds…

How it works

  1. Built a synthetic dataset of 5,000 digital payment transactions (web, mobile and POS, seven countries, three currencies) in an Excel master workbook, with 18 labelled frauds.
  2. Engineered behavioural features: transactions in the last 30 minutes, device reuse over 7 days, merchant diversity, deviation from the account's usual amount, USD conversion and time-of-day flags.
  3. Explored the data with summary statistics, a correlation matrix, fraud rates by country and channel, and z-score and IQR outlier checks.
  4. In her capstone she balanced classes with SMOTE, compared rule-based, tree-based and ensemble models, and studied threshold tuning, cost curves and explainability.
  5. This page takes a deliberately transparent route on the raw data: a class-weighted logistic regression (Newton's method) scored with stratified 5-fold cross-validation, plus a label-free z-score anomaly score, with explanations read straight from the coefficients.

Her written report quotes much higher accuracy and latency figures. Those were produced on SMOTE-oversampled synthetic data and cannot be reproduced from the raw file, so they are not shown here.

Data

First 10 rows of sheet Raw_Data. Account, device and merchant IDs are omitted from the page. Amount is in the listed currency; USD_Amount is converted.