Skip to content
Porto Seguro: Safe Driver Prediction

Porto Seguro: Safe Driver Prediction

Porto Seguro, a Brazilian insurer, asks which drivers will file a claim in the coming year. Of 595,212 policyholders in the training data, 21,694 did: 3.64 percent.

LightGBMImbalanced LearningBayesian OptimizationKaggle

595,212

policyholders

3.64%

filed a claim

217

engineered features

0.288

normalized Gini

Problem

Understanding the challenge and user needs

A model that predicts no claims at all scores above 96 percent accuracy and helps no one. The competition measures ranking quality with the normalized Gini coefficient, and missing values carry meaning of their own.

One feature is missing for more than two thirds of drivers and another for nearly half, which makes the absence itself informative.

The imbalance

ClassPolicyholdersShare
Filed a claim21,6943.64%
No claim573,51896.36%

The test set holds a further 892,816 policyholders.

Approach

Strategy and methods used to address the problem

Exploration compared claim rates across each feature's values and flagged a group of calculated features that carried no signal. Feature engineering expanded the matrix to 217 columns, and Bayesian optimization tuned a LightGBM model under cross-validation.

Bar charts of claim rate by feature value for informative and flat features (opens in a new tab)
Claim rate by feature value. The top row separates drivers; the calculated features in the bottom row sit flat on the average and carry no signal.
Correlations cluster among the car and regional features; the calculated block correlates with nothing.

Final Solution

The final design and outcome

The final model reached an out-of-fold normalized Gini of 0.288 across all 595,212 policyholders.

The model's top twenty-five features by gain.

Impact & Validation

Results, learnings, and outcomes

The analysis separates informative features from decorative ones before modeling, which keeps a model for a rare event from learning noise.