Propensity Score Modeling for Precision Marketing Campaigns
A practitioner's deep dive into building propensity models using logistic regression and gradient boosting, feature engineering from transaction history, and applying propensity scores to campaign targeting optimization.
Propensity Score Modeling for Precision Marketing Campaigns
In marketing, the most expensive mistake is targeting the wrong audience. Every email sent to a customer who will never convert, every ad impression shown to someone with zero purchase intent, every discount offered to someone who would have bought anyway — these are all wasted dollars. Propensity score modeling is the tool I have used throughout my career to systematically eliminate this waste.
A propensity model answers a deceptively simple question: what is the probability that this customer will take the desired action? The desired action might be purchasing a product, responding to a campaign, churning, upgrading, or any other binary outcome. The propensity score then becomes the targeting mechanism — you focus your marketing resources on customers with the highest propensity scores.
The Strategic Value of Propensity Scores
Before diving into the technical details, let me explain why propensity scores are so powerful for marketing:
Precision targeting: Instead of blasting a campaign to all customers, you target only those with propensity scores above a threshold. In my experience, targeting the top 20% by propensity score typically captures 60–80% of actual converters.
Budget efficiency: A well-calibrated propensity model can reduce marketing spend by 30–50% while maintaining the same conversion volume. Alternatively, you can increase conversion volume by 30–50% with the same budget by excluding low-propensity customers.
Offer optimization: Different propensity segments respond to different offers. High-propensity customers might convert with a small nudge (free shipping), while medium-propensity customers need a stronger incentive (20% discount). Low-propensity customers might not convert at any reasonable discount — do not waste the margin.
Campaign measurement: By comparing actual conversion rates against predicted propensity scores, you can measure the true incremental impact of your campaigns. If a campaign’s conversion rate is significantly higher than the propensity model’s prediction, the campaign is genuinely driving incremental behavior.
Data Foundation: Feature Engineering From Transaction History
The quality of propensity models depends almost entirely on feature engineering. I spend 70% of my time on features and 30% on model training and tuning.
Recency-Frequency-Monetary (RFM) Features
These are the backbone of propensity modeling:
Recency features:
- Days since last purchase
- Days since last website visit
- Days since last email open
- Days since last customer service interaction
- Trend: is recency increasing or decreasing compared to last quarter?
Frequency features:
- Total number of purchases (lifetime)
- Purchase frequency (purchases per month)
- Visit frequency (sessions per month)
- Email engagement frequency (opens per month)
- Frequency trend: accelerating or decelerating?
Monetary features:
- Average order value (AOV)
- Total lifetime spend
- Maximum single purchase value
- Monetary trend: increasing or decreasing AOV?
- Price sensitivity: response rate to discounts vs. full-price purchases
Behavioral Features
Beyond RFM, behavioral signals are incredibly predictive:
Browsing behavior:
- Number of product page views in the last 7/14/30 days
- Category diversity of browsing (browsing many categories signals active shopping)
- Cart abandonment rate (high abandoners with recent cart activity have high conversion propensity)
- Search query count and query specificity (specific searches signal high intent)
Engagement signals:
- Email open rate (last 30 days)
- Email click-through rate
- Push notification engagement rate
- App usage frequency (for mobile-first businesses)
- Social media engagement (likes, shares, comments on brand content)
Temporal features:
- Day-of-week purchase pattern (does the customer typically buy on weekends?)
- Time-of-day pattern
- Seasonal purchase patterns
- Payday alignment (for markets where this matters)
Product Affinity Features
Understanding what a customer is interested in dramatically improves propensity modeling:
- Category affinity scores (proportion of interactions per category)
- Brand affinity scores
- Price tier affinity (budget, mid-range, premium)
- New product responsiveness (do they buy new arrivals?)
- Cross-category purchase breadth
Feature Engineering Best Practices
Time windows matter: I always compute features over multiple time windows (7, 14, 30, 60, 90, 180, 365 days). Recent behavior is more predictive for short-term propensity, while longer windows capture stable preferences. The ratio of short-term to long-term features is itself predictive — a customer whose 7-day metrics exceed their 90-day metrics is trending upward.
Feature interactions: Some of the most powerful features are interactions:
- Recency × Frequency: Recent frequent buyers have extremely high propensity
- AOV × Category: High AOV in electronics vs. groceries signals very different behavior
- Channel × Engagement: Email-engaged customers who also use the app have higher propensity than single-channel engaged customers
Handling missing data: Missing data in marketing is informative. A customer with no email engagement data might have unsubscribed — this is a signal, not noise. I use indicator variables for missingness rather than imputing.
Model Selection: Logistic Regression vs. Gradient Boosting
Logistic Regression: The Interpretable Baseline
I always start with logistic regression as a baseline. It is:
- Highly interpretable (odds ratios for each feature)
- Stable in production (no tree splits to overfit)
- Fast to train and serve
- Easy to explain to marketing stakeholders
from sklearn.linear_model import LogisticRegression
from sklearn.preprocessing import StandardScaler
from sklearn.pipeline import Pipeline
# Build pipeline with scaling
pipeline = Pipeline([
('scaler', StandardScaler()),
('model', LogisticRegression(
C=0.1, # regularization
class_weight='balanced', # handle class imbalance
max_iter=1000
))
])
pipeline.fit(X_train, y_train)
propensity_scores = pipeline.predict_proba(X_test)[:, 1]
Key considerations for logistic regression:
- Multicollinearity: Highly correlated features inflate coefficient variance. I use VIF (Variance Inflation Factor) analysis and remove features with VIF > 5.
- Class imbalance: Marketing conversion data is typically highly imbalanced (2–5% conversion rate). I use
class_weight='balanced'or SMOTE for oversampling. - Non-linearity: Logistic regression cannot capture non-linear relationships. I engineer interaction terms and polynomial features to partially address this.
Gradient Boosting: The Performance Leader
For production propensity models, I almost always end up with gradient boosting (XGBoost or LightGBM) because it consistently outperforms logistic regression by 10–20% in AUC.
import lightgbm as lgb
model = lgb.LGBMClassifier(
n_estimators=500,
max_depth=6,
learning_rate=0.05,
subsample=0.8,
colsample_bytree=0.8,
min_child_samples=100,
scale_pos_weight=ratio_negative/ratio_positive,
reg_alpha=0.1,
reg_lambda=0.1,
random_state=42
)
model.fit(
X_train, y_train,
eval_set=[(X_val, y_val)],
callbacks=[lgb.early_stopping(50), lgb.log_evaluation(100)]
)
Key advantages of gradient boosting for propensity modeling:
- Handles non-linear relationships and feature interactions automatically
- Robust to multicollinearity
- Handles missing values natively (LightGBM)
- Provides feature importance for interpretability
Model Evaluation
I evaluate propensity models on four dimensions:
Discrimination: Can the model distinguish converters from non-converters?
- AUC-ROC: I target > 0.75 for a useful model, > 0.85 for a strong model
- Precision at top decile: What percentage of the top 10% by propensity score actually convert? I want this to be 3–5x the base rate
Calibration: Are the predicted probabilities accurate?
- I use calibration plots (predicted probability vs. actual conversion rate in each bin)
- A model that predicts 30% propensity for a group should see ~30% actual conversion in that group
- Poorly calibrated models lead to bad budget decisions
- I apply Platt scaling or isotonic regression to calibrate if needed
Stability: Does the model perform consistently over time?
- I evaluate on monthly holdout sets across 6+ months
- A model that performs well on one month but poorly on the next is useless in production
- Population Stability Index (PSI) on feature distributions helps detect drift
Business impact: Does targeting based on propensity scores actually improve campaign ROI?
- This requires an A/B test: propensity-targeted campaign vs. random or rule-based targeting
- I measure incremental revenue, not just conversion rate
Campaign Targeting With Propensity Scores
Threshold Selection
The propensity score threshold for campaign targeting depends on the economics:
Target if: propensity_score × revenue_per_conversion > cost_per_contact
For an email campaign with near-zero cost per contact, you might target everyone with propensity > 0.01. For a direct mail campaign costing $5 per piece, you might target only propensity > 0.15.
I build a gain chart that shows the cumulative percentage of converters captured by targeting each percentile of propensity score. This allows marketing teams to make informed tradeoffs between reach and precision.
Segment-Specific Campaigns
Rather than a single threshold, I create propensity-based segments with tailored campaigns:
High propensity (>0.6): Minimal incentive needed. Focus on convenience and urgency. “Complete your purchase” reminders, limited stock alerts, free shipping.
Medium propensity (0.2–0.6): Moderate incentive. Personalized product recommendations, moderate discounts (10–15%), social proof (reviews, popularity signals).
Low propensity (0.05–0.2): Strong incentive needed. Significant discounts (20–30%), bundled offers, educational content about product value.
Very low propensity (<0.05): Do not target. The cost of contact exceeds expected return. These customers need brand-building, not direct response campaigns.
Propensity Score Uplift Consideration
An important subtlety: propensity score measures the probability of conversion, not the probability of conversion because of the campaign. A customer with 0.8 propensity might buy regardless of whether you send a campaign. The campaign’s incremental impact is zero.
This is the distinction between propensity and uplift. For maximum marketing efficiency, you should target customers with high uplift (those whose behavior changes because of the campaign) rather than high propensity (those who will convert regardless).
I will cover uplift modeling in detail in my post on churn prediction with uplift modeling. For now, the key takeaway is: propensity scores are a necessary but not sufficient condition for efficient targeting. They are the first layer; uplift modeling is the second.
Production Deployment
Serving Architecture
Propensity scores need to be pre-computed and stored for fast retrieval during campaign execution:
- Batch scoring: Run the propensity model nightly on the full customer base
- Feature store: Store the latest propensity scores alongside the features used
- Campaign platform integration: Push propensity scores to the email marketing platform, ad platform, and CRM
- Real-time scoring: For triggered campaigns (cart abandonment, browse abandonment), score customers in real-time using a lightweight serving layer
Monitoring and Retraining
Propensity models degrade over time as customer behavior shifts. I monitor:
- Score distribution drift: PSI on propensity score distribution weekly
- Calibration drift: Compare predicted vs. actual conversion rates monthly
- Feature drift: PSI on individual feature distributions
Retraining triggers:
- PSI > 0.2 on propensity score distribution
- Calibration error exceeds 5 percentage points
- New significant features available
- Quarterly at minimum, regardless of drift
Lessons Learned
Lesson 1: Feature engineering beats algorithm choice every time. I have seen a well-featured logistic regression outperform a poorly-featured XGBoost model. Invest in features.
Lesson 2: Calibration matters more than AUC for marketing decisions. A model with AUC 0.80 and good calibration is more valuable than AUC 0.85 with poor calibration, because marketing budget decisions depend on the actual probability values.
Lesson 3: Segment-specific models often outperform a single global model. A propensity model for new customers (behavioral signals are different) separately from a model for returning customers often outperforms a one-size-fits-all approach.
Lesson 4: The propensity score is the beginning, not the end. The score tells you who is likely to convert. The real optimization comes from matching the right message, offer, and channel to each propensity segment.
Lesson 5: Always validate with a holdout experiment. Offline metrics (AUC, calibration) are necessary but insufficient. The ultimate test is whether propensity-targeted campaigns outperform the status quo in a controlled experiment.
Conclusion
Propensity score modeling is the foundation of precision marketing. By predicting which customers are most likely to take a desired action, you can allocate marketing resources efficiently, personalize campaigns by segment, and measure true campaign incrementality.
The technical implementation — logistic regression for interpretability, gradient boosting for performance, careful feature engineering from transaction history — is well-established. The real challenge is organizational: getting marketing teams to trust and act on propensity scores rather than their intuition.
Build the model, validate it rigorously, deploy it with proper monitoring, and then do the hardest part: convince the marketing VP that targeting 20% of customers will generate more revenue than targeting 100%. The data will support you.