Skip to content

mericozcann/explainable-financial-anomaly-intelligence

Repository files navigation

Explainable Financial Anomaly Intelligence (EFAI)

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.


Datasets and Licenses

1. Credit Card Fraud Detection Dataset

  • 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:

No warranty is given. Use of the dataset is entirely at the user's own risk.


2. PaySim Synthetic Mobile Money Dataset

  • 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.


Attribution

  • 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.


Requirements

  • Python 3
  • numpy
  • pandas
  • matplotlib
  • seaborn
  • scikit-learn
  • shap
  • reportlab (optional, for PDF export)

Usage

  1. Open the notebook in Google Colab.
  2. Upload the following files via the file upload cell:
    • creditcard.csv
    • PS_20174392719_1491204439457_log.csv
  3. Run all cells sequentially.
  4. Inspect the visualizations, risk scores, and SHAP explanations.
  5. Optionally, export the summary PDF report.

Disclaimer

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.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors