Spaces:
Sleeping
Sleeping
Update README.md
Browse files
README.md
CHANGED
|
@@ -1,8 +1,8 @@
|
|
| 1 |
---
|
| 2 |
title: FaudDetectionClassification
|
| 3 |
-
emoji:
|
| 4 |
-
colorFrom:
|
| 5 |
-
colorTo:
|
| 6 |
sdk: docker
|
| 7 |
app_port: 8501
|
| 8 |
tags:
|
|
@@ -12,9 +12,49 @@ short_description: Fraud detection for online payments using a Random Forest
|
|
| 12 |
license: mit
|
| 13 |
---
|
| 14 |
|
| 15 |
-
#
|
| 16 |
|
| 17 |
-
|
| 18 |
|
| 19 |
-
|
| 20 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
title: FaudDetectionClassification
|
| 3 |
+
emoji: π³
|
| 4 |
+
colorFrom: indigo
|
| 5 |
+
colorTo: pink
|
| 6 |
sdk: docker
|
| 7 |
app_port: 8501
|
| 8 |
tags:
|
|
|
|
| 12 |
license: mit
|
| 13 |
---
|
| 14 |
|
| 15 |
+
# π³ Payment Fraud Detection
|
| 16 |
|
| 17 |
+
This project demonstrates how machine learning can be used to detect fraudulent online payment transactions.
|
| 18 |
|
| 19 |
+
The Streamlit app allows users to enter transaction details and receive a prediction:
|
| 20 |
+
- **0** β Not Fraud
|
| 21 |
+
- **1** β Fraud
|
| 22 |
+
|
| 23 |
+
---
|
| 24 |
+
|
| 25 |
+
## π Application Overview
|
| 26 |
+
|
| 27 |
+
The app predicts fraud based on transaction-related features such as:
|
| 28 |
+
- Account age
|
| 29 |
+
- Number of purchased items
|
| 30 |
+
- Transaction time
|
| 31 |
+
- Payment method and payment method age
|
| 32 |
+
|
| 33 |
+
The goal is to accurately detect fraudulent transactions while minimizing false alarms.
|
| 34 |
+
|
| 35 |
+
---
|
| 36 |
+
|
| 37 |
+
## π€ Model
|
| 38 |
+
|
| 39 |
+
- **Algorithm:** Random Forest Classifier
|
| 40 |
+
- **Problem Type:** Binary Classification (Fraud vs. Not Fraud)
|
| 41 |
+
- **Class Imbalance Handling:** SMOTE (Synthetic Minority Oversampling Technique)
|
| 42 |
+
- **Evaluation Metrics:** Accuracy, Precision, Recall, F1-score, ROC-AUC
|
| 43 |
+
|
| 44 |
+
Among all tested models, Random Forest achieved the best performance and was selected as the final model.
|
| 45 |
+
|
| 46 |
+
---
|
| 47 |
+
|
| 48 |
+
## π Model Performance (Summary)
|
| 49 |
+
|
| 50 |
+
- Excellent separation between fraud and non-fraud transactions
|
| 51 |
+
- High precision and recall for fraud detection
|
| 52 |
+
- Robust performance on imbalanced data
|
| 53 |
+
|
| 54 |
+
---
|
| 55 |
+
|
| 56 |
+
## π How to Run Locally
|
| 57 |
+
|
| 58 |
+
```bash
|
| 59 |
+
pip install -r requirements.txt
|
| 60 |
+
streamlit run app.py
|