pymc-labs / pymc-marketing

Bayesian marketing toolbox in PyMC. Media Mix (MMM), customer lifetime value (CLV), buy-till-you-die (BTYD) models and more.
https://www.pymc-marketing.io/
Apache License 2.0
683 stars 190 forks source link

Add `rfm_segmentation` Utility #523

Closed ColtAllen closed 4 months ago

ColtAllen commented 8 months ago

RFM Segmentation is a way to segment customers on their past purchasing behavior. This is a complementary technique to CLV/BTYD modeling as customers in different segments benefit from different marketing strategies, and would be a good bridge between combining MMM and CLV.

A traditional rules-based RFM segmentation would be a straightforward addition, and I also have some ideas on a Bayesian clustering variant.

sarim-zafar commented 6 months ago

I also have some ideas on a Bayesian clustering variant.

My recent experience with an RFM segmentation project led me to discover the effectiveness of utilizing jenks breaks methodology over simple percentile-based segmentation. I found Jenks breaks logic to offer more meaningful segmentations. I suggest considering Jenks breaks as it could potentially enhance the segmentation process. There is a C-based implementation that can be found here.

ColtAllen commented 5 months ago

Hey @sarim-zafar,

Thanks for sharing. The Jenks Breaks methodology has some parallels with Dirichlet processes, which can be used to automatically infer the optimal number of clusters.