Views
No views yet
fraud_app/
├── app.py # Flask backend
├── fraud_model.pkl # Trained model (you provide this)
├── requirements.txt # Python dependencies
├── README.md
├── templates/
│ └── index.html # Main UI template
└── static/
└── style.css # Stylesheetfraud_app/).fraud_app/fraud_model.pklapp.py.1python -m venv venv
2source venv/bin/activate # Linux / macOS
3venv\Scripts\activate # Windowspip install -r requirements.txtpython app.pyfraud_model.pkl) is a Random Forest classifier trained on the PaySim synthetic financial dataset.| Feature | Formula |
|---|---|
balanceDiffOrig | oldbalanceOrg - newbalanceOrig |
balanceDiffDest | newbalanceDest - oldbalanceDest |
errorBalanceOrig | newbalanceOrig + amount - oldbalanceOrg |
errorBalanceDest | oldbalanceDest + amount - newbalanceDest |
drop_first=True. Baseline category = CASH_IN.type_CASH_OUT, type_DEBIT, type_PAYMENT, type_TRANSFER.| Field | Description |
|---|---|
| Step | Time unit in simulation (1 = 1 hr) |
| Transaction Type | CASH_IN, CASH_OUT, DEBIT, PAYMENT, TRANSFER |
| Amount | Value of the transaction |
| Sender Old Balance | Sender's balance before transaction |
| Sender New Balance | Sender's balance after transaction |
| Receiver Old Balance | Receiver's balance before transaction |
| Receiver New Balance | Receiver's balance after transaction |
| Prediction | Confidence | Risk Level |
|---|---|---|
| Fraud | ≥ 85% | High Risk |
| Fraud | 60–84% | Medium Risk |
| Fraud | < 60% | Moderate Risk |
| Legit | ≥ 85% | Low Risk |
| Legit | < 85% | Review Recommended |