data-mining-retail - lift and RFM segments

Jigon Yoo
Published

0
  • Project creator

A reproducible fictional retail pipeline that ranks cross-sell rules by lift and turns Recency, Frequency and Monetary behaviour into explainable customer segments.

The problem. Popular items can make weak pairings look strong. Confidence alone rewards common products; lift asks whether two items co-occur more often than chance would predict. RFM separates valuable but quiet customers from generic top spenders.

Input: 3,000 transactions, 300 customers, 16 items - with patterns deliberately planted (milk + sugar to coffee, butter + eggs to bread) that the pipeline has to rediscover on its own rather than being told about.

All 300 customers are assigned to exactly one segment - Loyal, Champions, Lost, Needs attention, At-risk, or New/Promising - so the output is actionable rather than decorative. Rules are ranked by excess co-occurrence over chance, not by raw support.

Code: github.com/jigonyoo/data-mining-retail