End-to-end Insurance Fraud Detection system using Machine Learning, with FastAPI backend and Streamlit frontend for real-time predictions.
The goal of this project is to detect fraudulent insurance claims using historical data and machine learning techniques. The system takes raw user input and predicts the probability of fraud in real time.
- Imbalanced dataset (fraud cases are rare)
- High-cardinality categorical features (occupation, hobbies, cities)
- Preventing data leakage during encoding
- Maintaining consistency between training and deployment
- Handled missing values
- Dropped irrelevant columns
- Converted date into cyclic features (month/day)
- Claim severity indicators
- Behavioral features (low witnesses, night incidents)
- Interaction features (e.g., severity × witnesses)
- Target Encoding for high-cardinality features
- One-Hot Encoding for remaining categorical variables
- Trained multiple models
- Selected Gradient Boosting based on F1-score optimization
- Built a FastAPI backend for predictions
- Applied the same preprocessing pipeline inside the API
- Developed a Streamlit UI for user interaction
git clone cd