ML in Marketing: Testing and Monitoring a User Negativity Model

Alexey Krot23 Aug 2024

Problem

A bank's marketing sends ads by SMS, push, email, banners and calls. Some clients contact the support line to opt out of all advertising, and the bank loses the channel for good. A model that finds clients who should not be disturbed today can reduce this, but it is hard to judge. Opt-outs are extremely rare, training-sample accuracy does not carry over to production, and the A/B test checks several metrics at once.

Example from the article: in production the bad rate was 293 opt-outs among 10,980,642 clients active in a day, about 2.67×10−5, versus roughly 5% in the training sample.

Solution in brief

Judge the model by lift at a fixed top-n% share of the daily score ranking, not by precision or a score threshold, and monitor ROC AUC and that lift per channel. Prove the effect with a 50/50 fixed-horizon A/B test: opt-out metrics against a Bonferroni-corrected level, with business counter-metrics checked for harm.

Questions this case answers
  • How to evaluate and monitor a classifier for an extremely rare event when ROC AUC stays high while precision collapses
  • How to prove with a randomized test that a rule excluding a small share of users cuts a negative outcome without hurting business metrics, when several metrics are tested at once
  • How to judge a model for a very rare event when ROC AUC looks fine but precision is tiny?
  • How to pick a cutoff share for a model that decides whom to skip in marketing?

Tools and methods

  • A/B test, fixed horizon — read after a full business cycle
  • Lift curve — picks the top-n% cutoff on rare-event scores
  • Power analysis (statsmodels) — MDE and sample size
  • Bonferroni correction — α=0.05/5=0.01 across five metrics
  • t-test (Student, Welch) — mean metrics, with Levene and Bartlett checks
  • SciPy, Plotly — normality tests, Q-Q plots
  • Apache Airflow or a BI tool — scheduled quality checks
Continue reading — it's free

Google or a one-time email code. No password.