CREDIT CARD FRAUD DETECTION - CODE SUBMISSION
==============================================
Student: Parth Kamleshkumar Suthar (ID 2434584)
Module: ACFA7003 Master's Project, MSc Data and AI, UWTSD
Supervisor: Md Shantnu Islam

CONTENTS
--------
1. Parth_Dissertation.ipynb  - main analysis notebook (runs end-to-end)
2. parth_dissertation.py     - script export of the notebook

DATASET (not included - 150 MB, publicly available)
---------------------------------------------------
ULB Credit Card Fraud Detection dataset (Kaggle):
https://www.kaggle.com/datasets/mlg-ulb/creditcardfraud

Download creditcard.csv and place it in the same folder as the
notebook (or update the file path in the data-loading cell).

Integrity check - the notebook verifies this SHA-256:
76274b691b16a6c49d3f159c883398e03ccd6d1ee12d9d8ee38f4b4b98551a89

HOW TO RUN
----------
Open Parth_Dissertation.ipynb in Jupyter (or Google Colab) and run
all cells from top to bottom. The notebook performs: dataset
validation, EDA, the 80/20 stratified split, 3-fold cross-validation
screening of nine model configurations, out-of-fold threshold
selection, final untouched test-set evaluation, calibration, SHAP
interpretation and error analysis.

Approximate runtime: 20-40 minutes depending on hardware.

ENVIRONMENT (versions used for the reported results)
----------------------------------------------------
python 3.12.13
pandas 2.2.2
numpy 2.0.2
scikit-learn 1.6.1
imbalanced-learn 0.14.2
xgboost 3.3.0
shap 0.52.0

Install with:
pip install pandas==2.2.2 numpy==2.0.2 scikit-learn==1.6.1 imbalanced-learn==0.14.2 xgboost==3.3.0 shap==0.52.0

KEY REPORTED RESULTS (for verification)
---------------------------------------
Selected model: XGB_original (no resampling, no class weighting)
Best CV mean average precision: ~0.8233
F2-selected threshold: 0.219160
Test set (98 frauds / 56,962 transactions):
  - default 0.5 threshold: 76 TP, 22 FN, 9 FP
  - F2 threshold:          84 TP, 14 FN, 24 FP
