Actuaris
Prices car insurance from how often claims happen and how much they cost.
Won’tNever retrains in production.
- Role
- Personal project
- When
- Mar – Sep 2026
- Built with
- Pythonscikit-learnXGBoostStreamlitNext.jsTypeScriptGitHub Actions

Why it exists
Many motor insurers still price from flat demographic tables. Low-risk drivers end up subsidising high-risk ones, which pushes good customers away.
What it does
- Separate claim-frequency (Poisson) and claim-severity (Gamma) models, trained with exposure weighting.
- An experiment grid comparing Poisson, Random Forest and XGBoost for frequency against Gamma, Random Forest and XGBoost for severity: 9 pairs.
- What-if scenarios for vehicle power, driver age and bonus-malus.
- A Streamlit app for single and batch scoring, a Next.js front end on Vercel, and CI on GitHub Actions.
What it won’t do
- The app never retrains in production: it loads trained models and only scores.
- It doesn’t skip the actuarial basics: Poisson for counts and Gamma for costs come first, tree models are compared against them.
- Partial policy-years aren’t counted as full ones: exposure is a sample weight.
How it works
Premium = expected claims per year × expected cost per claim, plus loading. The live app shows each part, so an underwriter can see where a price comes from.
Frequency · Poisson0.231claims per year
Severity · Gamma€1,115average claim
Expected loss€258per year
Premium€340per year
GammaR. ForestXGBoostPoissonGLM23R. Forest456XGBoost789
Sample rating from the live app: Renault, petrol, 38-year-old driver, bonus-malus 75. Grid: frequency model (rows) by severity model (columns).
By the numbers
9Model pairs compared
0.2396Baseline frequency RMSE
2,047Baseline severity MAE (€)
€340Sample yearly premium
What’s next
- Confidence intervals around frequency and severity.
- Drift detection that flags when retraining is needed.
- A fairness audit across demographic groups.
- SHAP explanations next to feature importance.
Next build notesLearnitfy
A corporate learning platform with JWT sign-in and role-based dashboards.
