plot_probability_alive_matrix#
- pymc_marketing.clv.plotting.plot_probability_alive_matrix(model, max_frequency=None, max_recency=None, title='Probability Customer is Alive,\\nby Frequency and Recency of a Customer', xlabel="Customer's Historical Frequency", ylabel="Customer's Recency", ax=None, **kwargs)[source]#
Plot probability alive matrix as heatmap. Plot a figure of the probability a customer is alive based on their frequency and recency.
- Parameters:
model (CLV model) – A fitted CLV model.
max_frequency (int, optional) – The maximum frequency to plot. Default is max observed frequency.
max_recency (int, optional) – The maximum recency to plot. This also determines the age of the customer. Default to max observed age.
title (str, optional) – Figure title
xlabel (str, optional) – Figure xlabel
ylabel (str, optional) – Figure ylabel
ax (plt.Axes, optional) – A matplotlib axes instance. Creates new axes instance by default.
kwargs – Passed into the matplotlib.imshow command.
- Returns:
axes
- Return type:
matplotlib.AxesSubplot