Skip to content
Back to Portfolio
Insurance Pricing - explainable ML for insurance charge prediction

Insurance Pricing

End-to-end ML system for predicting annual insurance charges with per-prediction explainability and business-readable reports

Client: Symfa · Miami · United States 🇺🇸
PythonFastAPIAutoGluonSHAPOpenAINext.jsReact

Highlights

Situation

Insurance pricing leans on actuarial models that work well but are opaque (hard for non-technical stakeholders to interpret) and assessed with metrics that aren't translated into business impact.

Task

Build an end-to-end ML system that predicts annual insurance charges, explains each individual prediction, and reports evaluation metrics in language both business and technical teams can trust.

Action

Built an AutoGluon tabular regressor with SHAP per-prediction contributions, GPT-4o-mini plain-language interpretation, extrapolation warnings, and Markdown EDA/evaluation reports in an interactive UI.

Result

Turned a black-box estimate into a transparent quote. Every prediction ships with ranked cost drivers and a readable explanation, closing the gap between model performance and stakeholder trust.

Core Team

Viacheslav Danilov

Viacheslav Danilov

R&D Lead

Symfa

Barcelona · Spain 🇪🇸

Mikhail Vinogradov

Mikhail Vinogradov

Data Scientist

Symfa

Barcelona · Spain 🇪🇸

Overview

Insurance Pricing is a full-stack machine learning application that estimates annual insurance charges from demographic and health factors, then explains how it reached each number. Designed for mixed business and technical audiences, it closes the common gap between strong model performance and stakeholder trust by making every prediction transparent and every metric interpretable.

Under the hood, an AutoGluon tabular regressor produces the estimate, SHAP computes the per-prediction feature contributions, and an OpenAI model turns those contributions into a plain-language explanation: a headline, the key cost drivers, and caveats about model limitations. Built-in extrapolation warnings flag inputs outside the training distribution, and automated EDA and evaluation reports are rendered directly in the UI.

Data

The model is trained on the public US Health Insurance Dataset, 1,300 records of individual policy attributes paired with annual charges:

  • •Features: Age, sex, BMI, number of children/dependents, smoker status, and US region.
  • •Target: Annual insurance charges, modeled as a tabular regression problem.
  • •Guardrails: Training-distribution bounds are stored so the app can warn when a query extrapolates beyond what the model has seen.

The deployment is databaseless: predictions are served entirely from the trained model artifact, with no external data store dependency.

Methods

The system is a modular prediction-and-interpretation pipeline, where each stage is independently callable through the API:

  • Feature Input & Preprocessing: User-provided insurance attributes are validated with Pydantic and transformed for model consumption.
  • Model Inference: A trained AutoGluon TabularPredictor artifact predicts the annual charge and checks the query against training-distribution bounds.
  • SHAP Value Computation: A TreeExplainer generates per-prediction feature contributions, ranking how each input pushes the estimate up or down.
  • LLM Interpretation: GPT-4o-mini translates the SHAP output into a structured, plain-language explanation: headline, key drivers, and caveats.
  • Evaluation Reporting: Model quality is summarized with R², MAPE, and SMAPE, with LLM-based interpretation that puts those metrics into business context.

Results

By pairing accurate predictions with explainability, the application reframes insurance pricing from a black box into a transparent, auditable quote:

  • •Interpretability: Every prediction ships with SHAP contributions plus an LLM explanation, replacing a low-transparency black box.
  • •Per-Prediction Transparency: Local SHAP explanations show the cost drivers behind each individual quote.
  • •Business-Readable Evaluation: Static R²/MAPE/SMAPE metrics become a human-interpreted evaluation report.
  • •Stakeholder Trust: Explainability and extrapolation warnings make results defensible across technical and non-technical teams.

A walkthrough of quoting an applicant, inspecting the SHAP cost drivers and plain-language explanation, and running a what-if comparison when smoking status changes is shown in Figure 1, and the full dashboard layout is shown in Figure 2.

Figure 1. Walkthrough of quoting an applicant, inspecting SHAP feature impacts and the AI interpretation, and comparing a non-smoker what-if scenario.
Figure 2. Insurance Pricing dashboard: input panel, estimated annual charge, a plain-language interpretation of the main drivers, and the SHAP feature-impact chart.

Conclusion

Insurance Pricing demonstrates an explainability-first approach to ML pricing: accurate AutoGluon predictions, SHAP-based local explanations, and LLM interpretation combine to make every quote understandable to the people who rely on it. The modular, databaseless architecture keeps each pipeline stage independently callable and simple to deploy.

As an end-to-end prototype, it is positioned to grow: planned extensions include advanced calibration analysis and ongoing model monitoring to keep predictions reliable as data shifts over time.

Keep Exploring

InsurTech

ML prototype for insurance claim fraud risk profiling using AutoGluon ensembles, SHAP explainability, and LLM-generated assessment summaries.

March 2026
Medical Devices

Non-invasive ICP monitoring using deep learning on cerebral blood flow signals from near-infrared photonic sensors.

December 2025