Spaces:
Sleeping
Sleeping
File size: 3,492 Bytes
67cda68 513edc0 |
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 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 |
---
title: Fraud Detection
emoji: π
colorFrom: green
colorTo: purple
sdk: gradio
sdk_version: 5.42.0
app_file: app.py
pinned: false
license: apache-2.0
short_description: Financial transactions fraud detection.
---
# π Credit Card Fraud Detection System
**Instantly detect fraudulent transactions with AI-powered risk assessment**
This system uses an **XGBoost machine learning model** to analyse credit card transactions and predict fraud risk in real-time. Simply enter transaction details and get an immediate risk assessment.
## π Quick Start
1. **Single Transaction**: Enter transaction details β Get instant fraud probability
2. **Batch Processing**: Upload CSV file β Process multiple transactions at once
3. **Risk Assessment**: Receive colour-coded risk levels with clear recommendations
## π― How It Works
The AI model analyses **40+ transaction features** including:
- Transaction amount and timing
- Card details and type
- Email domain patterns
- Geographic information
- User behaviour history
## π Risk Levels Explained
| Risk Level | Probability | What It Means | Action Required |
|------------|-------------|---------------|-----------------|
| π΄ **High Risk** | β₯80% | Very likely fraud | Block transaction immediately |
| π‘ **Medium Risk** | 50-79% | Suspicious activity | Manual review needed |
| π **Low Risk** | 20-49% | Some concerns | Monitor closely |
| π’ **Very Low Risk** | <20% | Normal transaction | Process as usual |
## π‘ Example Use Cases
- **Banks**: Screen transactions before processing
- **E-commerce**: Protect against fraudulent purchases
- **Fintech**: Real-time fraud monitoring
- **Research**: Analyse transaction patterns
## π οΈ Features
β
**Real-time predictions** - Results in under 1 second
β
**High accuracy** - Trained on large transaction dataset
β
**Easy to use** - Simple web interface, no coding required
β
**Batch processing** - Handle multiple transactions at once
β
**Professional insights** - Clear risk levels and recommendations
## π Model Performance
- **Algorithm**: XGBoost (Extreme Gradient Boosting)
- **Training Data**: Thousands of real transaction records
- **Accuracy**: High precision with low false positives
- **Speed**: Real-time inference (<100ms per prediction)
## π§ How to Use
### For Single Transactions:
1. Fill in the transaction form
2. Click "Analyse Transaction"
3. View risk assessment and follow recommendations
### For Multiple Transactions:
1. Prepare CSV file with transaction data
2. Upload file in "Batch Processing" tab
3. Download results with fraud probabilities
## π CSV Format for Batch Processing
Your CSV should include columns like:
```
TransactionAmt, card4, P_emaildomain, addr1, addr2, card1, card2, etc.
```
## β‘ Try It Now
No setup required - just enter your transaction details and get instant results!
## π‘οΈ Important Notes
- This is a **demonstration system** for educational purposes
- For production use, implement proper security measures
- Always combine AI predictions with human expertise
- Follow your organisation's fraud prevention policies
## π¬ Technical Details
The model uses advanced feature engineering including:
- Logarithmic transformations
- Time-based features
- Interaction variables
- Categorical encoding
- Missing value handling
Built with Python, scikit-learn, XGBoost, and Gradio.
---
**Ready to detect fraud?** Start by entering a transaction above! π |