MMM.forward_pass#
- MMM.forward_pass(x, dims)[source]#
Transform channel input into target contributions of each channel.
This method handles the ordering of the adstock and saturation transformations.
This method must be called from without a pm.Model context but not necessarily in the instance’s model. A dim named “channel” is required associated with the number of columns of
x
.- Parameters:
- x
pt.TensorVariable
|npt.NDArray
[np.float64
] The channel input which could be spends or impressions
- x
- Returns:
The
contributions
associated
with
the
channel
input
Examples
>>> mmm = MMM( date_column="date", channel_columns=["channel_1", "channel_2"], target_column="target", )