The brief: build a model that predicts insurance premiums for SecureLife Insurance Co., the fictional company in a 3MTT capstone, from 278,860 synthetic policy records with 20 columns.
What I found: none of the 18 customer and policy features predicts the premium. Four models, including two tree ensembles, scored an R² of about zero on 55,404 held-out policies. They do no better than quoting every customer the average premium. Showing that clearly, and saying what data would work instead, is the result.
Results
| Model | MAE | RMSE | R² |
|---|---|---|---|
| Ridge Regression | 695.0 | 897.2 | -0.0002 |
| Linear Regression | 695.0 | 897.2 | -0.0002 |
| Gradient Boosting | 695.0 | 897.3 | -0.0003 |
| Random Forest | 719.9 | 908.5 | -0.0255 |
| Ridge, tuned (alpha 100) | 695.0 | 897.2 | -0.000 |
The premium's standard deviation is about 895, so an RMSE of 897 is what a constant guess scores.
Why I trust it
The strongest correlation with the premium is Credit Score at 0.005. Every other feature is closer to zero.
Premiums spread evenly from 0 to the cap at every credit score. Income, health score, previous claims and age look the same.
- The flexible models found nothing the linear ones missed. The random forest did worse because it fitted noise.
- Grid search pushed Ridge to the strongest regularisation on offer, which is what happens when the best model is close to a constant.
A correction I made: my first report ranked the Ridge coefficients as "drivers" of premiums (education, exercise, smoking). The largest is about ±9.5 on a premium that varies by about 895, so those values are noise. I withdrew that reading rather than present it as insight.
What the business would need
- Sum insured, deductible and claim amounts, not just claim counts
- Underwriting decisions per policy, and vehicle value or telematics for auto cover
- Then: a log-transformed premium, and every model compared with a predict-the-mean baseline from the start
What I built
- Profiling of 278,860 records: missing values (up to 29% in two columns), skew, and dirty date fields
- Median imputation with missing-value flags and a
years_since_policy_startfeature - A reusable scikit-learn preprocessing pipeline (scaling and one-hot encoding), saved with joblib
- Four regression models on one 80/20 split, plus grid-search tuning