← All Projects
Fintech · Machine Learning · Advanced Version

Guardian of
Your Money

Real-time fraud detection engine with rule-based explainability. Identifies account takeover, mule accounts, and high-risk patterns — with human-readable reasoning for every decision.

🛡 Fraud Detection ⚡ Real-time 🔍 Explainable AI ☁ IBM Cloud 6.3M+ Training Records
By The Numbers

Project Impact

6.3M+
Training transaction records
5
Transaction types classified
5
ML algorithms compared
<200ms
Live inference response time
Interactive

Live Fraud Detector

Enter a transaction below and get an instant risk assessment with explainable reasoning — just like the production system.

🛡 Guardian — Fraud Intelligence Engine
System Online
🛡
Enter transaction details and click
Analyze Transaction to see the risk assessment.
How It Was Built

Full Build Workflow

Every step from raw data to deployed production system.

01
Data Collection
6.3M+ Synthetic Financial Records
Sourced the PaySim synthetic financial dataset. Performed EDA to understand fraud class imbalance (0.13% fraud rate), transaction type distributions, and feature correlations using heatmaps and distribution plots.
df['isFraud'].value_counts() # 8,213 fraud out of 6,362,620 total df.groupby('type')['isFraud'].mean() # Fraud rate by type # TRANSFER: 0.40%, CASH_OUT: 0.18%, others: 0.0%
PaySim Dataset6.3M recordspandas EDA
02
Feature Engineering
Engineering Signals That Matter
Created derived features: account balance drain ratio (how much of origin balance was removed), destination balance delta, sequential step velocity, and transaction chain detection. Applied SMOTE to handle severe class imbalance.
df['drain_ratio'] = df['amount'] / (df['oldbalanceOrg'] + 1) df['dest_received'] = df['newbalanceDest'] - df['oldbalanceDest'] df['zeroed_origin'] = (df['newbalanceOrig'] == 0).astype(int) # SMOTE oversampling for balanced training
SMOTEFeature EngineeringBalance Delta
03
Model Training
5-Algorithm Comparison
Trained and compared: Logistic Regression, Decision Tree, Random Forest, XGBoost, and a Neural Network. Evaluated on precision, recall, F1, and AUC-ROC. Random Forest + XGBoost emerged as top performers — ensemble selected for production.
RandomForestXGBoostLogRegAUC-ROCF1 Score
04
Explainability Layer
Rule-Based Human-Readable Reasons
Post-prediction rule engine generates natural-language explanations. Every fraud flag includes 2–4 reasons a human investigator would understand — not just a probability score. Covers 11 distinct fraud pattern categories.
reasons = [] if drain_ratio > 0.95: reasons.append("Account drained in single transaction") if tx_type in ['TRANSFER','CASH_OUT'] and new_orig == 0: reasons.append("Origin account zeroed — mule pattern detected") if step < 5 and amount > 50000: reasons.append("High-value early-hour anomaly")
Rule Engine11 PatternsExplainable AI
05
Deployment
Flask API + IBM Cloud
Packaged as a REST Flask API with /predict and /batch endpoints. Model serialized with joblib, deployed on IBM Cloud. Response includes risk score, tier, reasons, and recommended action. Average inference time <200ms.
@app.route('/predict', methods=['POST']) def predict(): data = request.json score, reasons = fraud_engine.analyze(data) return jsonify({ 'risk_score': score, 'tier': get_tier(score), 'reasons': reasons, 'action': get_action(score) })
Flask REST APIIBM Cloudjoblib<200ms
Data Visualization

Power BI Dashboard

Analytics showing fraud patterns, model performance, and transaction intelligence.

📊
Fraud Rate by Transaction Type
🍩
Risk Tier Distribution
0.13%
Low Risk (60%)
Medium (12%)
High (6%)
Fraud (0.13%)
📊
Embed Your Power BI Report
Paste your Power BI embed URL below to display your full interactive dashboard — including fraud velocity heatmaps, model comparison charts, and balance delta analysis.
Tech Stack
Tools & Libraries
Python 3.10scikit-learnXGBoost RandomForestpandasnumpy SMOTEFlaskIBM Cloud joblibmatplotlibseaborn