Skip to content

Understanding units in mmm.fit_result #617

Answered by smusch2
smusch2 asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @wd60622 - I think I figured it out, but it'd be great if you could confirm.

mmm = DelayedSaturatedMMM(
    model_config = my_model_config,
    sampler_config = my_sampler_config,
    date_column="date_week",
    channel_columns=["x1", "x2"],
    control_columns=[
        "event_1",
        "event_2",
        "t",
    ],
    adstock_max_lag=8,
    yearly_seasonality=2,
)

with pm.Model() as model:
    mmm.fit(X=X, y=y, target_accept=0.95, chains=4, random_seed=rng)
    idata_1 = pm.sample(
        target_accept=0.95,
        draws=2000,
        chains=4,
        nuts_sampler="numpyro",
        random_seed=rng
    )

# Inverse of MinMax
beta_channel = np.array([idata_1["posterior"]["bet…

Replies: 4 comments 3 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
3 replies
@wd60622
Comment options

@wd60622
Comment options

@cetagostini
Comment options

Answer selected by cetagostini
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants