MMM.plot_direct_contribution_curves#
- MMM.plot_direct_contribution_curves(show_fit=False, same_axes=False, xlim_max=None, channels=None, quantile_lower=0.05, quantile_upper=0.95)[source]#
Plot the direct contribution curves for each marketing channel.
The term “direct” refers to the fact that we plot costs vs immediate returns and we do not take into account the lagged effects of the channels e.g. adstock transformations.
- Parameters:
- show_fitbool, optional
If True, the function will also plot the curve fit. Defaults to False.
- xlim_max
int
, optional The maximum value to be plot on the X-axis. If not provided, the maximum value in the data will be used.
- channels
List
[str
], optional A list of channels to plot. If not provided, all channels will be plotted.
- same_axesbool, optional
If True, all channels will be plotted on the same axes. Defaults to False.
- Returns:
plt.Figure
A matplotlib Figure object with the direct contribution curves.