Skip to content

A machine learning project to detect credit card fraud using the Kaggle Credit Card Fraud Detection dataset. Implements data analysis, modeling, and ethical considerations.

Notifications You must be signed in to change notification settings

Alireza-Foroughi-uk/FraudGuard-ML

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

8 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

FraudGuard-ML ๐Ÿ’ณ๐Ÿ”’

Welcome to FraudGuard-ML, a cutting-edge machine learning project designed to detect credit card fraud with precision and flair! ๐ŸŽฏ Built by a team of passionate developers from Ulster University, this project leverages data science to secure financial transactions and boost trust in the digital economy. ๐Ÿ’ธ

#Project Overview ๐Ÿ“‹

Whatโ€™s the Deal? ๐Ÿค”
FraudGuard-ML uses the Kaggle Credit Card Fraud Detection dataset (284,807 transactions!) to identify fraudulent activities in real-time. With only 0.172% of transactions being fraud, we tackled the class imbalance head-on using advanced ML techniques. ๐ŸŽ‰
Tech Stack: ๐Ÿ› ๏ธ
    Python ๐Ÿ
    Libraries: Pandas, Scikit-learn, XGBoost, Seaborn, Matplotlib, Imbalanced-learn
    Tools: Google Colab, Kaggle API
Key Features: ๐ŸŒŸ
    Data cleaning and preprocessing (no missing values, duplicates gone! โœ…)
    Feature engineering with PCA and Random Forest for top-notch insights ๐Ÿ“Š
    Models: Logistic Regression, Random Forest, SVM, and XGBoost (winner with 0.94 AUC-PR! ๐Ÿ†)
    Real-time fraud detection simulation ๐ŸŽฎ
    Stunning visualizations (heatmaps, violin plots, scatter plots) ๐Ÿ“ˆ

#How It Works โš™๏ธ

Data Import & Cleaning: ๐Ÿ“ฅ
Grabbed the dataset from Kaggle, cleaned it with Pandas, and sampled 10,000 records for efficiency. No dirty data here! ๐Ÿงน
Data Wrangling: ๐Ÿ”ง
Scaled features like Time and Amount with StandardScaler, balanced classes with SMOTE. Balanced datasets = happy models! โš–๏ธ
Analysis & Visualization: ๐Ÿ“Š
Plotted class distributions, correlation heatmaps, and feature distributions to uncover fraud patterns. Eye-candy for data lovers! ๐Ÿ‘€
Modeling: ๐Ÿค–
Trained multiple classifiers, with XGBoost shining brightest (F1-Score: 0.86, AUC-PR: 0.94). Confusion matrices? Check! ROC curves? Double check! ๐Ÿ“‰
Deployment: ๐Ÿš€
Built a real-time prediction function and saved the Random Forest model for deployment. Ready to catch fraudsters in action! ๐Ÿ•ต๏ธโ€โ™‚๏ธ

#Results & Impact ๐ŸŒ

Performance: ๐Ÿ“ˆ
XGBoost nailed it with a 93.6% probability on a sample transaction (Transaction ID: 172001, Amount: โ‚ฌ149.23). False positives? Minimized! ๐Ÿ’ช
Impact: ๐Ÿ’ก
With global card fraud losses hitting $32.34 billion in 2022, FraudGuard-ML is a step toward safer online banking. Letโ€™s protect those wallets! ๐Ÿ›ก๏ธ
Limitations: โš ๏ธ
Class imbalance, feature interpretability (thanks, PCA!), and overfitting risks are noted. Future work: fairness audits and real-world testing! ๐Ÿ”

About

A machine learning project to detect credit card fraud using the Kaggle Credit Card Fraud Detection dataset. Implements data analysis, modeling, and ethical considerations.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published