LogLinkSpec#
- class pymc_marketing.mmm.link.LogLinkSpec[source]#
Log link:
E[y] = exp(mu) * target_scale.When used with
LogSaturation, the model becomes a log-log specification where coefficients have an elasticity-like interpretation. Note that under the default scaling pipeline (y_scaled = y / target_scale), the intercept absorbslog(target_scale)and channel data is divided bychannel_scale, so the beta coefficients are approximate elasticities with respect to scaled spend rather than strict textbook elasticities with respect to raw spend.Methods
LogLinkSpec.__init__(*args, **kwargs)Register counterfactual
total_media_contribution_original_scaleand{output_var}_original_scale.Return
Normal(0, 5)intercept prior (wider for log-scale).Return
LogNormallikelihood prior.Return
exp(mu).Return
exp(variable) * target_scale.Raise if likelihood is incompatible with link.
Raise
ValueErrorif y contains non-positive values.Attributes
link