How to Interpret Machine Learning Models for Actuaries: SHAP, Partial Dependence, and Feature Importance Tutorial

Interpreting machine learning models is a crucial skill for actuaries aiming to blend predictive power with clear, actionable insights. While traditional actuarial models like generalized linear models (GLMs) offer straightforward explanations, modern machine learning techniques often act as “black boxes,” making interpretation challenging. However, tools like SHAP (SHapley Additive exPlanations), Partial Dependence Plots (PDP), and Feature Importance measures open the door to understanding how models make predictions, helping actuaries validate models, communicate results effectively, and comply with regulatory expectations.

Let’s walk through these methods, focusing on practical examples and tips that actuaries can apply immediately.

Why Interpretability Matters for Actuaries

Actuaries are often tasked with building models that impact pricing, reserving, risk assessment, and fraud detection. These decisions affect policyholders, regulators, and the company’s bottom line. A model that predicts accurately but cannot be explained risks being rejected by stakeholders or failing compliance checks. Interpretability bridges this gap by revealing how input variables influence predictions, ensuring models make sense both statistically and from a business perspective.

Moreover, interpretability helps detect model bias, identify data issues, and improve feature engineering — all essential for robust actuarial modeling[5][7].

Feature Importance: The First Step in Understanding

Feature importance methods rank the input variables by their influence on the model’s predictions. For example, when predicting insurance claim frequency, features like age, vehicle type, or driving history might have varying degrees of impact.

There are multiple ways to calculate feature importance:

  • Permutation Importance: This technique measures how much the model’s error increases when a feature’s values are randomly shuffled. A larger increase means the feature is more important.

  • Built-in Model Importance: Some algorithms, like random forests or gradient boosting machines, provide importance scores based on how often a feature is used to split data and how much it reduces error.

  • SHAP Values (aggregated): Summing SHAP values across all instances gives a global importance ranking.

As a practical tip, start by plotting feature importance to identify which variables drive your model. This can inform variable selection and highlight unexpected influences, such as a feature that shouldn’t be predictive but appears important due to data leakage or bias[4][5].

Partial Dependence Plots: Visualizing the Average Effect

Once you know which features matter, the next question is: How do they affect predictions? Partial Dependence Plots (PDPs) help answer this by showing the average predicted outcome as a single feature changes, keeping other features fixed.

Imagine you want to understand how the age of a policyholder affects predicted claim frequency. A PDP will plot predicted claims against age, revealing whether the relationship is linear, monotonic, or more complex.

Here’s a practical example: if a PDP shows that claim risk sharply increases after age 65, this insight can guide underwriting policies or premium adjustments.

A few things to keep in mind:

  • PDPs show average effects and may mask interactions between features.

  • They work best with continuous or ordinal features but can be adapted for categorical ones.

  • Complement PDPs with Individual Conditional Expectation (ICE) plots to see heterogeneity among individual predictions.

Using PDPs, actuaries can confirm that model behavior aligns with actuarial judgment or uncover novel patterns worth investigating further[4][5].

SHAP: Explaining Predictions at a Granular Level

SHAP values borrow from cooperative game theory to fairly distribute the contribution of each feature to a single prediction. Unlike feature importance or PDPs that provide global or average explanations, SHAP shines in explaining individual decisions.

For example, if a model predicts a high fraud risk for a particular claim, SHAP can reveal which features — say, unusually high claim amount and suspicious billing codes — pushed the prediction higher.

Key advantages of SHAP for actuaries:

  • Local interpretability: Understand why the model made a specific prediction.

  • Global insights: Aggregated SHAP values show overall feature importance.

  • Consistency: SHAP values satisfy properties ensuring fair attribution.

A practical workflow might look like this:

  1. Generate SHAP values for your dataset.

  2. Use summary plots to identify influential features.

  3. Drill down with force plots to explain individual cases, useful for audit or regulatory review.

For instance, if a SHAP force plot for a high-risk policyholder shows that recent accidents and high mileage were the main drivers, an actuary can validate that these factors make sense or flag anomalies for further review[2][4][5].

Bringing It All Together: A Practical Example

Suppose you’re developing a machine learning model to predict health insurance claim costs. After training a gradient boosting model, you want to ensure the model is trustworthy and understandable.

  • Start by plotting feature importance to see which variables dominate. Maybe age, chronic conditions, and recent hospital visits rank highest.

  • Use PDPs to examine how each feature affects predictions. Perhaps costs rise steadily with age but spike dramatically for certain chronic diseases.

  • Finally, use SHAP values to explain individual predictions, especially outliers with unusually high predicted costs. This helps in validating the model and supporting underwriting decisions.

Incorporating these interpretability tools into your modeling workflow enhances transparency, builds stakeholder trust, and ensures compliance with regulatory demands for explainable AI[3][5][7].

Tips and Best Practices

  • Combine methods: Use feature importance, PDPs, and SHAP together for a comprehensive understanding.

  • Validate with domain knowledge: Interpretations should align with actuarial expertise and business logic.

  • Watch out for correlated features: Correlations can distort interpretations; consider using SHAP interaction values or removing redundant variables.

  • Communicate clearly: Tailor explanations to your audience. Technical teams may appreciate detailed SHAP plots, while business leaders might prefer summary visuals and plain language.

  • Use open-source tools: Libraries like SHAP (Python), PDPbox, and scikit-learn’s permutation importance are accessible and integrate well with common ML frameworks.

Why This Matters Now

With the increasing adoption of machine learning in insurance and actuarial science, the ability to interpret complex models is no longer optional. Regulators are demanding transparency, and companies want actionable insights, not just predictions.

Studies show that interpretable models can improve fraud detection rates and pricing accuracy while maintaining stakeholder confidence. For example, incorporating interpretability tools has helped insurers reduce false positives in claims fraud by revealing key drivers and interactions[3][5].

In short, mastering interpretability techniques like SHAP, PDPs, and feature importance equips actuaries to harness the full power of machine learning without sacrificing clarity or trustworthiness.


By integrating these tools thoughtfully, actuaries can elevate their predictive modeling from a black box to a trusted partner in decision-making. It’s like adding a powerful new lens to your actuarial toolkit — one that reveals not just what the model predicts, but why it predicts it. And that understanding is invaluable in today’s data-driven insurance world.