Skip to content

Machine learning model to predict customers' propensity to purchase vehicle insurance.

Notifications You must be signed in to change notification settings

KenethRojas/insurance-purchase-propensity-model-python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

11 Commits
Β 
Β 
Β 
Β 

Repository files navigation

Insurance Purchase Propensity Model: A Predictive Analysis Using Python

πŸ“Œ Business Context

An insurance company wants to identify which customer base they can offer one of its most important products, vehicle insurance. Marketing campaigns can be inefficient if they target customers with low purchase intent.

This projects analyze historical customer data to create a predictive model about probability of customers' purchase using Machine Learning with Python.

🎯 Objective

  • Identify patterns that allows differentiate between buying and non-buying customers.
  • Estimate the probability of a customer purchasing vehicle insurance.
  • Rank customers according to their likelihood of purchase
  • Support the prioritization of sales efforts, focusing on customers with the highest likelihood of purchasing insurance.

πŸ“Š Dataset

  • Source: Insurance Company Dataset - Confidential data; identifiers and features anonymized for this repo.
  • Records: 30K+
  • Features: Variable1 to Variable10: Customer demographic, transaction history, and interaction data (anonymized).
  • Target: Vehicular_Flag, indicating whether the customer purchased vehicle insurance (1 = purchased, 0 = not purchased).

Note: This dataset is anonymized and shared for the purpose of showcasing data science techniques. It does not contain any personally identifiable information and is based on behavioral data. The actual dataset is proprietary and cannot be publicly shared.

πŸ› οΈ Methodology

  • Data cleaning and preprocessing: Validation of nulls and duplicates.
  • Exploratory Data Analysis (EDA): Identification of target imbalance (~6% of buyers), which can introduce challenges for the model.
  • Feature engineering: Application of logarithmic transformation to reduce asymmetries. Normalization of variables through standardization.
  • Selection of a predictive technique: Logistic regression due to its stability and interpretability. Stratified train/test split (70/30). Class weighting to address imbalance.

πŸ’‘ Key Insights

  • Customers were segmented into propensity deciles based on the score assigned by the model.
  • The area under the curve (AUC) metric was 0.758, which validates the model's discrimination capacity.
  • The higher deciles, ergo, the groups with the highest scores, represent a greater proportion of buyers.
  • Decile 10 has an approximate purchase rate of 19%, more than three times the overall average (~6%). Decile 9 has 11% rate.

🧰 Tools & Technologies

  • Python
  • pandas, numpy, scikit learn
  • PyCharm IDE

πŸš€ Next Steps

  • Prioritize commercial efforts initially on the 10th decile and secondarily on the 9th decile.
  • Integrate propensity scores into marketing campaigns to prioritize high-potential customers, minimizing marketing spend inefficiency.
  • Retrain the model periodically with new data to avoid data drift and keep the model up to date.
  • Explore threshold adjustments based on business objectives (conversion vs. reach).

About

Machine learning model to predict customers' propensity to purchase vehicle insurance.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages