pymc-marketing icon indicating copy to clipboard operation
pymc-marketing copied to clipboard

Pull out TVP as component

Open wd60622 opened this issue 8 months ago • 2 comments

Having an API like:

from pymc_marketing.mmm import TVP

tvp = TVP(...)

coords = {
    "date": dates_in_model, 
}
with pm.Model(coords=coords): 
    # Ideally one thing that the user need to know about. Example 
    days_since_reference = pm.Data("days_since_reference", ..., dims="date")
    intercept= pm.Determistic(
        "tvp_intercept", 
        tvp.apply(days_since_reference), 
        dims="date",  
    )

    mu = intercept # + media_contributions + controls + various
    # Rest of model


Related to #711

CC: @ulfaslak

wd60622 avatar Jun 16 '24 06:06 wd60622