Upload README.md with huggingface_hub
Browse files
README.md
ADDED
@@ -0,0 +1,49 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
tags:
|
3 |
+
- fraud-detection
|
4 |
+
- random-forest
|
5 |
+
- sklearn
|
6 |
+
library_name: sklearn
|
7 |
+
pipeline_tag: tabular-classification
|
8 |
+
---
|
9 |
+
|
10 |
+
# Random Forest Fraud Detection Model
|
11 |
+
|
12 |
+
This model uses Random Forest classification to detect potential fraud based on various account and transaction features.
|
13 |
+
|
14 |
+
## Model Description
|
15 |
+
|
16 |
+
- **Input Features:**
|
17 |
+
- Account Age (months)
|
18 |
+
- Frequency of credential changes (per year)
|
19 |
+
- Return to Order ratio
|
20 |
+
- VPN/Temp Mail usage (binary)
|
21 |
+
- Credit Score
|
22 |
+
|
23 |
+
- **Output:** Binary classification (Fraud/Not Fraud)
|
24 |
+
- **Type:** Random Forest Classifier
|
25 |
+
|
26 |
+
## Usage
|
27 |
+
|
28 |
+
```python
|
29 |
+
import joblib
|
30 |
+
import numpy as np
|
31 |
+
|
32 |
+
# Load model and scaler
|
33 |
+
model = joblib.load('random_forest_model.joblib')
|
34 |
+
scaler = joblib.load('rf_scaler.joblib')
|
35 |
+
|
36 |
+
# Prepare input (example)
|
37 |
+
input_data = np.array([[25, 0.5, 0.4, 0, 800]])
|
38 |
+
|
39 |
+
# Scale input
|
40 |
+
scaled_input = scaler.transform(input_data)
|
41 |
+
|
42 |
+
# Get prediction
|
43 |
+
prediction = model.predict(scaled_input)
|
44 |
+
probability = model.predict_proba(scaled_input)
|
45 |
+
```
|
46 |
+
|
47 |
+
## Limitations and Bias
|
48 |
+
|
49 |
+
This model should be used as part of a larger fraud detection system and not in isolation.
|