plot_frequency_recency_matrix#
- pymc_marketing.clv.plotting.plot_frequency_recency_matrix(model, future_t=1, max_frequency=None, max_recency=None, title=None, xlabel="Customer's Historical Frequency", ylabel="Customer's Recency", ax=None, **kwargs)[source]#
Plot expected purchases in future_t time periods as a heatmap based on customer population frequency and recency.
- Parameters:
- model: CLV model
A fitted CLV model.
- future_t: float, optional
Future time periods over which to run predictions.
- max_frequency: int, optional
The maximum frequency to plot. Defaults to max observed frequency.
- max_recency: int, optional
The maximum recency to plot. This also determines the age of the customer. Defaults to max observed recency.
- 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:
matplotlib.AxesSubplot
- axes: