This project implements a fraud detection system using machine learning techniques. The system is designed to detect fraudulent transactions in credit card data. It employs various classifiers trained on a dataset containing both legitimate and fraudulent transactions.
- Data collection from CSV file
- Data exploration and visualization
- Machine learning models for fraud detection
- Prediction and decision logic for fraud detection
- Model evaluation and comparison
- Preprocessing techniques including SMOTE for handling imbalanced data
The dataset used in this project is from PayPal credit card transactions. It contains a total of 284,807 transactions with 31 features including time, transaction amount, and various anonymized features.
- Clone the repository:
- ** git Clone the repository**:
https://github.com/Rawlingsofficial/My-Paypal>
- Install dependencies:
pip install -r requirements.txt
- Run the main script:
run the main sript in your jupyter enviroment of choice
-
Data Exploration: Explore the dataset to understand its structure and characteristics.
-
Data Visualization: Visualize data distributions, correlations, and other patterns using plots and heatmaps.
-
Machine Learning: Train and evaluate machine learning models for fraud detection. Models include:
- Random Forest Classifier
- Gradient Boosting Classifier
- XGBoost Classifier
- K Nearest Neighbors Classifier
- Prediction and Decision Logic: Predict fraud using trained models and implement decision logic based on model predictions.
-
Random Forest Classifier:
-
Accuracy: 99.94%
-
AUPRC: 87.66%
-
XGBoost Classifier:
-
Accuracy: 99.94%
-
AUPRC: 86.70%
-
Other Models: Results for Gradient Boosting and K Nearest Neighbors classifiers are also available.
my_paypal.ipynb
: Main file for this project.README.md
: Documentation for the project.
This project is licensed under the MIT License - see the LICENSE file for details.