With the expansion of digital payments and the evolution of fraud tactics, developing effective detection systems is crucial. This project is motivated by the technical challenge inherent in leveraging advanced machine learning to build highly accurate and reliable models for credit card fraud prevention.
My personal drive lies in applying my experience to a significant real-world problem. By meticulously analyzing transaction data, engineering insightful features, and deploying robust modeling techniques, I aim to significantly enhance financial security and build greater confidence in digital transactions.
- Data Overview
You can download the data from https://www.kaggle.com/datasets/ealtman2019/credit-card-transactions.
- Understanding unbalanced data and converting class into factors
Content:
The dataset presents an extensive collection of around 24.4 million credit card transactions, sourced from IBM's financial database. Capturing a wide spectrum of user interactions, the data provides a detailed snapshot of transaction behaviors, patterns, and potential vulnerabilities.
-
Fixing inconsistencies and missing values to keep the data clean, and remove redundancies for accuracy.
- Fraud Dataset
-
Time Distribution
Time Variation: The distribution of fraud cases displays distinct time variations -
Transaction Method
Transaction Amount: Fraud is predominantly observed in transactions of smaller values
-
Implementing Logistic Regression on three sampling methods which are undersampling, oversampling and SMOTE
Improve Logistic Results using Decision Tree & Random Forest on SMOTE
Implementing ANN (Artificial Neural Network)
Evaluation of model results using Performance Metrics (Recall, Precision and F1score, AUC-ROC)
Displaying Performance Reports -
Exploratory Data Analysis showed that some variables have significant impact on the fraud rate such as time, amount and transaction method, so I incorporated them into the predictive models.
- Please refer to the Jupyter notebook Fraud_Detection_Report.ipynb for model comparison details.
