An end-to-end fraud detection pipeline built on the IEEE-CIS Fraud Detection Kaggle competition dataset. This repository demonstrates a complete machine learning workflow for detecting fraudulent transactions in real-time financial systems. Starting with 590K+ transactions and 434 raw features, we engineer intelligent risk signals, benchmark multiple gradient boosting algorithms, and maintain a rigorous experiment log — all designed for production-ready deployment.
Feature Engineering Guess & pray Hypothesis-driven with adversarial validation Model Selection Single algorithm LGBM · XGBoost · CatBoost benchmark Validation Naïve train/test Stratified splits + early stopping + threshold tuning Experiment Tracking Scattered notebooks Versioned experiment log with F1 deltas Categorical Handling One-hot explosion (485+ features) Native LightGBM category support Model Analysis Basic accuracy SHAP · Calibration · PR Curves · Confusion Matrix
0.84370.25CatBoost442+40.1% over baseline
The project utilizes advanced machine learning techniques to predict customer risk levels. Key features include:
Comprehensive Feature Engineering: Developed over 400 features, including time-based, count-based, and identity-based features, to capture complex fraud patterns.
Model Benchmarking: Evaluated and compared multiple gradient boosting models (LightGBM, XGBoost, CatBoost) to identify the best performing algorithm.
Rigorous Validation: Employed stratified splits, early stopping, and threshold tuning to ensure robust model performance.
Explainable AI (XAI): Integrated SHAP values for model interpretability, allowing for detailed analysis of individual predictions and feature importance.
Production-Ready Pipeline: Designed for real-time deployment, with optimized data processing and model serving capabilities.
The project focuses on creating meaningful features that capture user behavior and transaction anomalies. Notable engineered features include:
UID-based features: Aggregations and statistics derived from user identifiers (e.g., uid_transaction_count, uid_mean_amount) to identify suspicious patterns.
Temporal features: Analysis of transaction timing (e.g., uid_mean_hour) to detect unusual activity.
Match indicators: Features capturing consistency between different data points (e.g., card address vs. billing address).
The project provides extensive visualizations and performance metrics to demonstrate the effectiveness of the fraud detection models. This includes:
Confusion Matrix Analysis: Visualizes true positives, true negatives, false positives, and false negatives to assess classification accuracy.
Precision-Recall Curve: Illustrates the trade-off between precision and recall, crucial for imbalanced datasets.
Model Calibration: Assesses how well the predicted probabilities align with actual fraud rates.
Feature Importance: Identifies the most influential features driving fraud predictions across different models.
SHAP Analysis: Provides both global and local explanations for model predictions, enhancing transparency and trust.
Built with