Compare Decision Tree and SVM models for detecting credit card fraud. Includes data preprocessing, model training, evaluation, and visualizations.
Credit card transactions labeled as fraudulent or non-fraudulent. Features are anonymized via PCA.
Source: Credit Card Fraud Detection Dataset
Inspired by IBM Machine Learning Professional Certificate on Coursera:
IBM Developer Skills Network
- Load dataset & visualize class distribution.
- Feature correlation analysis.
- Standardize & normalize features.
- Train-test split & sample weighting.
- Train models: Decision Tree (max_depth=4) & Linear SVM.
- Evaluate with ROC-AUC, ROC curve, and Precision-Recall curve.
| Model | ROC-AUC |
|---|---|
| Decision Tree | 0.939 |
| SVM | 0.986 |
git clone https://github.com/<your-username>/decision_tree_svm_creditcard_fraud.git
cd decision_tree_svm_creditcard_fraud
pip install -r requirements.txt
# Open notebook or run script