Integrated Transactional and Behavioral Risk Scoring with Interpretable AI
This repository contains an educational and research-oriented notebook that demonstrates:
- Transaction-level anomaly detection using the Credit Card Fraud dataset
- Behavioral risk scoring based on the PaySim synthetic mobile-money dataset
- Integrated pre-risk scoring with normalized risk indicators
- Performance evaluation via ROC and Precision–Recall analysis
- Risk class assignment (Low, Medium, High)
- Explainable AI analysis using SHAP
- Relational pattern discovery via PCA-based visualization
- Optional automatic PDF report generation
This project is designed strictly for educational, experimental, and academic research purposes.
- File used:
creditcard.csv - Original dataset: European cardholders credit card transactions
- License: Database Contents License (DbCL) v1.0
- License summary:
- The licensor grants a worldwide, royalty-free, non-exclusive, perpetual, and irrevocable copyright license for the contents of the database.
- You may use the contents for any purpose, including commercial use.
- This license does not cover database rights (for full database structure, see ODbL).
- The data is provided “as is” without any warranty.
- The licensor disclaims all liability for any direct or indirect damages.
Full license text:
- Open Data Commons – Database Contents License (DbCL) v1.0
https://opendatacommons.org/licenses/dbcl/1-0/
No warranty is given. Use of the dataset is entirely at the user's own risk.
- File used:
PS_20174392719_1491204439457_log.csv - Original dataset: PaySim synthetic mobile money transaction simulator
- License: Creative Commons Attribution–ShareAlike 4.0 International (CC BY-SA 4.0)
- Canonical URL: https://creativecommons.org/licenses/by-sa/4.0/
You are free to:
- Share — copy and redistribute the material in any medium or format
- Adapt — remix, transform, and build upon the material for any purpose, even commercially
Under the following terms:
- Attribution — You must give appropriate credit to the original creators, provide a link to the license, and indicate if changes were made.
- ShareAlike — If you remix, transform, or build upon the material, you must distribute your contributions under the same license.
- No Additional Restrictions — You may not apply legal terms or technological measures that legally restrict others from doing anything the license permits.
No warranties are given. Other rights such as privacy, publicity, or moral rights may still apply.
-
Credit Card Fraud Detection Dataset:
UCI / OpenML distribution (original European cardholder transactions) -
PaySim Dataset:
López-Rojas et al., “PaySim: A Financial Mobile Money Simulator for Fraud Detection”
Licensed under CC BY-SA 4.0
All dataset rights remain with their respective original creators.
- Python 3
- numpy
- pandas
- matplotlib
- seaborn
- scikit-learn
- shap
- reportlab (optional, for PDF export)
- Open the notebook in Google Colab.
- Upload the following files via the file upload cell:
creditcard.csvPS_20174392719_1491204439457_log.csv
- Run all cells sequentially.
- Inspect the visualizations, risk scores, and SHAP explanations.
- Optionally, export the summary PDF report.
This project is intended solely for educational, experimental, and research purposes.
- It does not constitute financial advice.
- It does not represent a production-grade fraud detection or risk assessment system.
- The authors assume no legal or financial responsibility for any use of the outputs.
- All analyses are performed on publicly available datasets under their respective licenses.
Use of this repository implies acceptance of the terms of the original dataset licenses.