YAML Metadata Warning:empty or missing yaml metadata in repo card
Check out the documentation for more information.
Credit Card Fraud Detection Pipeline
This repository contains an end-to-end machine learning pipeline to detect fraudulent credit card transactions.
Project Structure
eda.py: Performs Exploratory Data Analysis and generates visualizations.preprocess.py: Scales data usingRobustScalerand handles imbalance with SMOTE.train.py: Trains Logistic Regression and Random Forest models.evaluate.py: Generates performance metrics (AUPRC, Recall, Precision) and plots.predict.py: Provides an interface for making predictions on new transaction data.
Performance Summary
| Model | AUPRC | Precision (Fraud) | Recall (Fraud) |
|---|---|---|---|
| Logistic Regression | 0.734 | 0.06 | 0.90 |
| Random Forest | 0.796 | 0.51 | 0.84 |
Quick Start
- Explore Data:
python eda.py - Preprocess State:
python preprocess.py - Train Models:
python train.py - Evaluate Performance:
python evaluate.py - Run Inference:
from predict import predict_fraud
result = predict_fraud(transaction_features)
print(result)
Visualizations
Check the following generated files in the root directory:
class_distribution.pngprecision_recall_curve.pngconfusion_matrix_random_forest.png
# Fraud-Detection
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support