Datasets 🗃️
- European Credit Card Dataset 2023 - Real anonymized European cardholder transactions
- Financial Transactions Dataset - Synthetic financial transaction data
- Processed datasets with 1:2 fraud-to-legitimate ratio for balanced training
Prerequisites
Ensure the following are installed:
- Git
- Python 3.8+
- Jupyter Notebook (or install the Jupyter extension on Visual Studio Code)
To set up this project locally, follow these steps:
- Clone the repository:
git clone https://github.com/thebugged/credit-card-fraud-detection- Change into the project directory:
cd credit-card-fraud-detection- Create a virtual environment (recommended):
python -m venv fraud_env
source fraud_env/bin/activate # On Windows: fraud_env\Scripts\activate- Install the required dependencies:
pip install -r requirements.txt- Create the models directory and add your trained models:
mkdir models
# Place your trained model files:
# - european_fraud_model.pkl
# - synthetic_fraud_model.pkl
# - european_scaler.pkl
# - synthetic_scaler.pkl- Run the Streamlit application:
streamlit run main.py- Alternatively, you can train the models first by running this notebook
main_modelling.ipynb. Then run the command in step 1.
The application will be available in your browser at http://localhost:8501.
fraud-guard-detection/
├── main.py # Main Streamlit application
├── apps/ # Application pages
│ ├── home.py # Home dashboard
│ ├── fraud_detection.py # Fraud detection interface
│ └── resources.py # Documentation and resources
├── models/ # Trained models and scalers
├── data/ # Dataset files
├── requirements.txt # Python dependencies
└── README.md # Project documentation
This project is developed for educational and research purposes. It should not be used for actual financial decision-making without proper validation, compliance measures, and regulatory approval.