What percentage of customers bought?

Create quintile variables for recency, frequency and monetary.

Hint: Review the rfm-bbb.py python code file that walks through the calculations for the Bookbinders RFM analysis in detail. Use the xtile function from the pyrsm package to create the recency, frequency, and monetary value quantiles. Note the use of rev=True for freq_iq and mon_iq to ensure the best customers are in the 1st quantile

Create bar charts showing the response rate

The proportion of customers who bought AHOF per recency, frequency, and monetary quintile (i.e., 3 plots)

Create the rfm_iq index.

Next, create the sequential RFM variables using select rec_iq as the variable to group by for freq_sq. Select both rec_iq and freq_sq as the variables to group by for mon_sq. Note that we do not need to create a rec_sq variable as this is equivalent to rec_iq.

Next create the rfm_sq index.

The line in the plot below shows the break-even point. Cells with a response rate above 0.0247 are predicted to be profitable.

Offering the deal only to those the customers in (sequential)

RFM cells with a response rate that is greater than the breakeven response rate. Specifically, follow these steps:

Create a plot with all profit and ROME numbers

Evaluate model performance

Get the list of prospect to contact from the rest of the customer database