pyro-ppl / brmp

Bayesian Regression Models in Pyro
Apache License 2.0
70 stars 8 forks source link

Should we support brms' centering transform? #13

Open null-a opened 5 years ago

null-a commented 5 years ago

See the center arg. of brmsformula.

eb8680 commented 5 years ago

@neerajprad Is this something we could support upstream with more generic transformations in Pyro, as in e.g. this paper?

neerajprad commented 5 years ago

While we don't automatically reparametrize a model, a user can easily do so in NumPyro (not Pyro though) using TransformedDistributions. See this example on Neal's funnel. i.e. instead of using dist.Normal(mu, sigma) they can use dist.TransformedDistribution(dist.Normal(0., 1.), AffineTransform(mu, sigma)).

I think that should be sufficient for brmp since all the latents are being generated by us.

null-a commented 5 years ago

I think we're talking about two different things here. The thing I had in mind (which I called "brms' centering transform") is a transform of the data (mean centering) which is enabled by default. I'm not sure whether this is important, but if we don't have it we might simply want to note it as a difference between the two systems.