This project focuses on detecting fraudulent credit card transactions using machine learning techniques. It aims to develop robust algorithms to identify fraudulent transactions while minimizing false positives.
The project is structured into the following sections:
- Dataset
- Data Preprocessing
- Modeling
- Evaluation
- Results
- Conclusion
The dataset used for this project is available on Kaggle: Fraud Detection Dataset.
The data preprocessing steps include:
- Dropping irrelevant features.
- Creating new features (e.g., customer age).
- Removing redundant location features.
- Identifying and handling outliers.
- Reducing the feature set to avoid the curse of dimensionality and overfitting.
Four machine learning models were tested:
- Support Vector Machine (SVM)
- AdaBoost
- Random Forest
- Logistic Regression
The evaluation metrics used are:
- Accuracy: Proportion of correctly classified instances.
- Precision: Proportion of correctly identified fraudulent transactions.
- Recall (Sensitivity): Proportion of truly fraudulent transactions correctly identified.
- F1 Score: Harmonic mean of precision and recall.
Due to the imbalanced nature of the dataset (1289160 non-fraudulent vs. 7506 fraudulent transactions), both over-sampling and under-sampling techniques were applied.
- Over-Sampling: Improved the model performance by balancing the data.
- Under-Sampling: Also used to balance the data, providing different insights.
The best models for this problem were AdaBoost and Random Forest.
The project successfully identified methods to reduce redundant information and balance the dataset. AdaBoost and Random Forest models showed the best performance in detecting fraudulent transactions.