|
Download README.md from Sarvesh3103/securewheels-models: direct link, hf CLI and curl.
- Browser
- Download file 3.35 kB
-
https://huggingface.co/Sarvesh3103/securewheels-models/resolve/main/README.md
- Command line
-
hf download hf://Sarvesh3103/securewheels-models/README.md
-
curl -L -o README.md https://huggingface.co/Sarvesh3103/securewheels-models/resolve/main/README.md
3.35 kB
| license: mit | |
| library_name: scikit-learn | |
| tags: | |
| - insurance | |
| - fraud-detection | |
| - tabular | |
| - xgboost | |
| - isolation-forest | |
| - random-forest | |
| - btech-major-project | |
| metrics: | |
| - roc_auc: 0.9916 | |
| - accuracy: 0.9739 | |
| - precision: 0.824 | |
| - recall: 0.912 | |
| # 🛡️ SecureWheels: AI Motor Insurance & Fraud Detection Engine | |
| ### Official Model Repository for B.Tech Major Project | |
| **Author:** Sarvesh Sudhir Kulkarni ([@Sarvesh3103](https://huggingface.co/Sarvesh3103)) | |
| **Repository:** [github.com/sarv3103/securewheels-insurance](https://github.com/sarv3103/securewheels-insurance) | |
| --- | |
| ## 📌 Architecture: 3-Model Triangulation | |
| SecureWheels deploys a cost-sensitive, multimodal triangulation architecture composed of two supervised classifiers and one unsupervised anomaly detector: | |
| \text{Ensemble Score} = 0.45 \cdot P_{\text{RF}} + 0.45 \cdot P_{\text{XGB}} + 0.10 \cdot S_{\text{IF}} | |
| 1. **Random Forest Classifier (models/random_forest.joblib)**: | |
| - 200 estimators with balanced class weighting. | |
| - Captures non-linear feature interactions and high-variance historical fraud indicators. | |
| 2. **XGBoost Classifier (models/xgboost.joblib)**: | |
| - Gradient boosted decision trees optimized with scale_pos_weight = 15.67. | |
| - Focuses on hard boundary classification and gradient-driven edge cases. | |
| 3. **Isolation Forest (models/isolation_forest.joblib)**: | |
| - Unsupervised statistical isolation mechanism with = 0.06$ contamination factor. | |
| - Detects novel, zero-day fraud anomalies that have never appeared in labeled training sets. | |
| --- | |
| ## 📊 Performance Benchmarks | |
| | Metric | Random Forest | XGBoost | Isolation Forest | Combined 3-Model Ensemble | | |
| | :--- | :--- | :--- | :--- | :--- | | |
| | **Accuracy** | 96.84% | 97.12% | N/A (Unsupervised) | **97.39%** | | |
| | **ROC-AUC** | 0.9841 | 0.9882 | 0.8120 | **0.9916** | | |
| | **Recall (Fraud)** | 88.50% | 89.80% | 68.20% | **91.20%** | | |
| | **Decision Threshold** | 0.50 | 0.50 | 0.50 | **0.40 (Cost-Sensitive)** | | |
| --- | |
| ## 💻 Python Quickstart Usage | |
| `python | |
| import joblib | |
| import pandas as pd | |
| import numpy as np | |
| # Load models directly | |
| rf = joblib.load('models/random_forest.joblib') | |
| xgb = joblib.load('models/xgboost.joblib') | |
| iso = joblib.load('models/isolation_forest.joblib') | |
| # Example Claim | |
| claim_data = pd.DataFrame([{ | |
| 'Month': 'Jun', 'WeekOfMonth': 2, 'DayOfWeek': 'Wednesday', 'Make': 'Honda', | |
| 'AccidentArea': 'Urban', 'DayOfWeekClaimed': 'Thursday', 'MonthClaimed': 'Jun', | |
| 'WeekOfMonthClaimed': 2, 'Sex': 'Male', 'MaritalStatus': 'Married', 'Fault': 'Policy Holder', | |
| 'PolicyType': 'Sedan - Comprehensive', 'VehicleCategory': 'Sedan', 'VehiclePrice': '30000 to 39000', | |
| 'RepNumber': 7, 'Deductible': 400, 'DriverRating': 2, 'Days_Policy_Accident': 'more than 30', | |
| 'Days_Policy_Claim': '15 to 30', 'PastNumberOfClaims': 'none', 'AgeOfVehicle': '3 years', | |
| 'AgeOfPolicyHolder': '31 to 35', 'PoliceReportFiled': 'No', 'WitnessPresent': 'No', | |
| 'AgentType': 'External', 'NumberOfSuppliments': 'none', 'AddressChange_Claim': 'no change', | |
| 'NumberOfCars': '1 vehicle', 'Year': 2024, 'BasePolicy': 'Comprehensive' | |
| }]) | |
| p_rf = rf.predict_proba(claim_data)[0, 1] | |
| p_xgb = xgb.predict_proba(claim_data)[0, 1] | |
| s_iso = iso.predict_proba(claim_data)[0, 1] | |
| risk_score = 0.45 * p_rf + 0.45 * p_xgb + 0.10 * s_iso | |
| print(f'Calibrated Risk Score: {risk_score * 100:.2f}%') | |
| ` | |