Replies: 1 comment
|
Hi @Aminshnn , Thank you for contacting us! Here is how to address priors interacting with one-hot encoded variables and sparsity both in Meridian. 1. Setting Priors for One-Hot Encoded ColumnsYou are correct that applying a single 1D prior to all 4 columns would broadcast the same expected contribution across each, which could artificially inflate the overall expectation. Passing a multi-dimensional prior array is the correct approach to distribute the total expected contribution.
2. Handling Sparsity and Frequency (
|
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Consider a case that we have incentive as our non-media treatment. The default prior for incentive is HalfNormal or Truncated Normal(0,0.1,0.1). Im my case, the incentive variable is categorical variable which takes 5 levels. So, I use one-hot encoding and will get 4 new columns. Now, my first question is how I should set prior for each new column?
if I set the prior on the each new column like Truncated Normal(0,0.1,0,1), it will be like increasing the possible contribution of the original incentive variable in the prior distribution. What is the best approach to set the prior for each column corresponding to each level?
Another concern is that when we use one hot encoding, each level would take 1 only for a fraction of observations. I think when we set the prior Truncated Normal(0,0.1,0,1) for a variable, the assumption is that it will take non-zero values often. How should we incorporate the fact that each level of incentive can take 1 for p fraction of times? Do we need to consider the fraction p in the prior? For example, if the prior is the default prior and a level takes 1 only 20% of time, the contribution in active periods can be so high, like 50%, and at the end, the total contribution of that level is still reasonable and low.
All reactions