File size: 1,096 Bytes
6fa1fcb
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
---
tags:
- fraud-detection
- random-forest
- sklearn
library_name: sklearn
pipeline_tag: tabular-classification
---

# Random Forest Fraud Detection Model

This model uses Random Forest classification to detect potential fraud based on various account and transaction features.

## Model Description

- **Input Features:**
  - Account Age (months)
  - Frequency of credential changes (per year)
  - Return to Order ratio
  - VPN/Temp Mail usage (binary)
  - Credit Score

- **Output:** Binary classification (Fraud/Not Fraud)
- **Type:** Random Forest Classifier

## Usage

```python
import joblib
import numpy as np

# Load model and scaler
model = joblib.load('random_forest_model.joblib')
scaler = joblib.load('rf_scaler.joblib')

# Prepare input (example)
input_data = np.array([[25, 0.5, 0.4, 0, 800]])

# Scale input
scaled_input = scaler.transform(input_data)

# Get prediction
prediction = model.predict(scaled_input)
probability = model.predict_proba(scaled_input)
```

## Limitations and Bias

This model should be used as part of a larger fraud detection system and not in isolation.