Skip to content

🔧 MMM Prior Issue - LogNormal saturation_beta not responding to different mu values #1928

@RamiFisherTW

Description

@RamiFisherTW

I'm having trouble with media priors.
I created a function to set saturation_beta using LogNormal (instead of HalfNormal) so I can control the mu parameter directly based on my MTA ROI estimates.

Problem: Even with drastically different mu values and tight sigmas like (0.9, 0.01) vs (9.0, 0.01), the model converges to identical results.

My function:

def _create_roas_informed_prior_config(self, media_channels, informed_roas=None, default_roas=1.5):
    """
    Create a configuration dictionary for PyMC Marketing Mix Model priors
    informed by historical ROAS values.
    """
    channel_mus = []
    channel_sigmas = []
    very_tight_sigma = 0.01  # Tight but numerically stable
    default_sigma = 0.5
    
    if informed_roas is not None:
        for channel in media_channels:
            if channel in informed_roas:
                roas = informed_roas[channel]
                # For LogNormal, mu is the log of the desired median value
                channel_mus.append(np.log(roas))
                channel_sigmas.append(very_tight_sigma)
            else:
                channel_mus.append(np.log(default_roas))
                channel_sigmas.append(default_sigma)
    else:
        channel_mus = [np.log(default_roas)] * len(media_channels)
        channel_sigmas = [default_sigma] * len(media_channels)
    
    return {
        "saturation_beta": {
            "dist": "LogNormal",
            "kwargs": {"mu": channel_mus, "sigma": channel_sigmas},
            "dims": "channel"
        }
    }
  • Something wrong with my LogNormal parameterization?
  • A saturation function interaction I'm missing?
    Any insights appreciated! 🙏

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions