I would like to create a weighted Bernoulli function in pyro (with known weights). As some of my observations are more trustworthy than others. The log-likelihood for LR:
My question is how do I alter the likelihood of such Bernoulli function:
with pyro.plate('data'):
pyro.sample('y', dist.Bernoulli(logits=p), obs=y)
Could I simply add to the power of the weights as shown below:
with pyro.plate('data'):
pyro.sample('y', dist.Bernoulli(logits=torch.sign( p ) * torch.pow(torch.abs( p ), w)), obs=y)
(with w being the weights)
My example runs, it only does not give me the desired results… Could someone please explain to me why this does not work or how I should implement it instead?