It is important that credit card companies are able to recognize fraudulent credit card transactions so that customers are not charged for items that they did not purchase.
With the provided information, build a model to predict whether this customer will commit fraud when using a credit card or not.
This data set is Credit Card Fraud Detection from Kaggle. The dataset contains transactions made by credit cards in September 2013 by European cardholders. This dataset presents transactions that occurred in two days, where we have 492 frauds out of 284,807 transactions. The dataset is highly unbalanced, the positive class (frauds) account for 0.172% of all transactions.
- Due to security issues, the original features V1, V2, ... V28 have been modified by PCA. However, we can guess that these features could be credit card number, expiration date, CVV, cardholder name, transaction location, transaction datetime, etc.
The only two features that have not been converted with PCA are
Time
andAmount
. Therefore, we only need to focus on processing these two features
- Log transform
amout
feature - Handling Data Imbalance: I used SMOTE method for balancing the dataset.
- Robust scaling all data
- On using Pearsonr Correlation method, I don't need to drop any features.
- Widely used ML models: Logistic Regression, Decision Tree, Random Forest, LightGBM, Catboost, XGBoost, AdaBoost
- SOTA model: TabNet
- The Random Forest model gives the best
f1_score
results but the training time is long and computationally expensive and TabNet model is overfitting, so for optimization we will choose the LightGBM model for fine-tuning.