Telematics Risk Assessment
Predicting insurance claims from how people actually drive.
A dual-model machine-learning system that turns raw trip telematics — GPS, accelerometer, speed — into 50+ driving-behavior features, then predicts both the probability and the likely severity of an insurance claim, with interpretable risk factors and risk tiers.
- claim ROC-AUC (baseline 0.524)
- 0.689
- severity R² (baseline 0.398)
- 0.485
- engineered driving features
- 50+
Why it exists
Usage-based insurance prices risk from behavior rather than from proxies such as age or postcode. That requires two things traditional rating models do not handle well: turning noisy, high-frequency sensor data into meaningful driving features, and predicting both whether a claim will happen and how expensive it is likely to be.
How it works
- 01 Input Raw trip data GPS, accelerometer, speed
- 02 Code Feature engineering 50+ behavior & time features
- 03 Model / AI Claim probability XGBoost classifier
- 04 Model / AI Claim severity XGBoost regressor
- 05 Output Risk tier & drivers low → very high
- Feature engineering converts trip data into more than 50 features: harsh-driving intensity, speeding patterns, distance, night driving, time-of-day patterns and a composite risk score.
- Two models, two questions. A classifier predicts claim probability; a separate regressor predicts claim amount. Class imbalance is handled with
scale_pos_weight, and claim amounts are log-transformed. - Tuned with Optuna, then versioned in a simple model registry for batch or single-trip inference.
- Interpretable output: each driver gets a risk tier and the factors behind it.
Results and honest limits
From the project’s experiments on a 1,200-driver dataset:
- Claim probability: ROC-AUC improved from 0.524 to 0.689 and recall doubled after tuning and feature work.
- Claim severity: RMSE fell from $2,156 to $1,847 and R² rose from 0.398 to 0.485.
- Top predictive features: composite risk score, harsh-driving intensity, speed risk, total distance and night driving.
Engineering decisions
- Separate frequency and severity models, mirroring how actuaries decompose expected loss.
- Explicit imbalance handling and log-transformed targets rather than accepting a model that predicts “no claim” for everyone.
- Reproducible environment: Docker and Docker Compose for training, inference and notebooks, with command-line, Python and notebook interfaces.
Who it’s for
For insurers exploring usage-based products, it is a transparent starting point that separates claim frequency from severity. For data scientists, it is an honest example of what imbalanced claim data does to headline metrics.