An end-to-end machine learning project that detects fraudulent credit card transactions using LightGBM.
This project demonstrates the complete ML workflow — from data preprocessing and model training to saving models (.pkl and .joblib) and deploying with a Flask web app.
- Handles large-scale credit card transaction datasets efficiently.
- Uses LightGBM Classifier for high performance.
- Saves trained models as both
.pkland.joblibfor flexibility. - Web UI built with Flask for real-time fraud detection.
- Modular and production-ready project structure.
credit-card-fraud-detection/ │ ├── notebooks/ │ └── train_model.ipynb # Training & evaluation notebook │ ├── models/ │ ├── fraud_model.pkl # Saved model (pickle) │ └── fraud_model.joblib # Saved model (joblib) │ ├── app.py # Flask web app for deployment ├── requirements.txt # Dependencies ├── README.md # Project documentation └── data/ └── creditcard.csv # Dataset (not uploaded due to size)
- Clone the repo:
git clone https://github.com/your-username/credit-card-fraud-detection.git cd credit-card-fraud-detection
python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate pip install -r requirements.txt
jupyter notebook notebooks/train_model.ipynb
python app.py