Hi @jessegrabowski,
First of all, thanks for your replies. Let’s extend this conversation for a while.
So you have proposed two options:
- first - is your initial version
- second message of yours and also explaining why 2) is better then 1).
- Let me drop another option:
conversions = pm.MutableData(f"{regressor}_conv_data", pivot_table[regressor].values)
eq_determ = pm.Deterministic(f"{regressor}_eq",
pm.math.sqr(
pm.math.sum(
(pm.math.dot(channel_A_coef , channel_A_spend) - (conversions))
)
),
)
eq_constraint = pm.Potential(
"channel_A_constraint",
at.switch(
pm.logp(pm.Normal.dist(mu = 0, sigma=0.0001), eq_determ), 0, -np.inf
),
)
Questions:
- Can you please share your opinion on which option you see as the best between 2 and 3? Would be also glad to know why 3 is still worse than 2 (if it is).
- I am looking forward to adding pm.GaussianRandomWalk to have time-varying. Is option two still stays the best in this scenario?
- Any chance I can make option 3) potential more narrow? I also have tried pm.Uniform instead of pm.Normal - it resulted in model performance really dropping down
Also, a bit separate question here:
In my init model I am using pm.find_constrained_prior for a channel. If I am adding GaussianRandomWalk to the model, should I switch to pm.Bound instead or somehow should modify pm.find_constrained_prior to be optimized per GaussianRandomWalk step?
The overall idea behind is like this: While model performance metrics are good (mape/smape 0.15/0.15) model coefs are super unrealistic - addition find_constrained_prior improoved ‘realisticity’ of coef, so this is something I reely would like to keep in the model
Thanks in advance