Bayesian nonparametrics in greta


#1

Hi,

What is the current status of greta in terms of whether it can be used to fit Bayesian nonparametrics?

The unconf discussion in April 2018 included a comment from Nick Golding to the effect that greta definitely couldn’t do varying dimension methods: https://github.com/ropensci/unconf18/issues/21

But did I pick up later news correctly, that greta now incorporates TensorFlow Probability? And since that has a component “edward2”, and Edward says (on its homepage) that it can deal with Bayesian nonparametrics, does that mean that greta can also now deal with Bayesian nonparametrics?

It might possibly be useful in future to have a page on the greta-stats site, maybe at the top of docs, that gives a quick summary (1 or 2 paragraphs?) of the features currently available in greta? I know it would be a pain having to keep updating it, and there’s info on github, but the github updates aren’t always that readable for people not yet familiar with greta and TF. But I realise you are all are probably crazy busy so it may not be feasible at the moment!

Thanks very much
Louise


#2

Hi Louise,

There is a greta.gp package (currently not working) that sets up Gaussian processes in greta: https://github.com/greta-dev/greta.gp. This is one example of a Bayesian nonparametric approach (sensu Orbanz). I’ve got an open PR that should get greta.gp working with the latest version of greta but we’re having some issues with travis: https://github.com/greta-dev/greta.gp/pull/9.

I don’t know if anyone is working on a Dirichlet process model, which would be an exciting extension and might be able to handle some of the transdimensional ideas.

Jian


#3

Hi Jian,

Thanks for your quick reply. I would need Dirichlet processes, not Gaussian processes, so that’s disappointing if greta still doesn’t handle Dirichlet processes.

Thanks
Louise


#4

Hi,
I had the same problem recently, too. :slight_smile: TFP/Edward2 can as far as I know only use truncated DPs, right? You can do the same in Greta by, e.g. using the stick-breaking construction for clustering and truncating the DP at some K.


#5

That’s right, because greta can’t (yet) handle unknown discrete random variables you can’t do the true infinite mixture models. But you can do finite mixtures with mixture(), so with large enough K you should be able to do this with greta. I’m not very familiar with DPs in particular, but I’m very happy to help out if someone would like to try this!


#6

Hi nick, dirmeier,

Thanks for the DP info.

I am probably not going to be working on the nonparametrics form of my problem just yet.

I’m starting by looking at other approaches, and was just scouting for info to see if greta would be a good framework to use for all the different approaches I want to try, or whether I’ll have to use different frameworks for the different approaches (less than ideal). And right now it looks like I can’t actually use greta for my problem anyway, because I’m dealing with discrete data and need a sampler that can cope with discrete distributions for internal parameters, not just for the observed data.

But if greta has gained discrete samplers by the time I’m looking at the nonparametrics approach, I’ll probably try and make use of it, and I’ll keep you posted how it goes.

Thanks


#7

Hi Louise,

I made a toy example using the function mixture() over two multinomial distributions. However, it seems that greta couldn’t tell the distribution apart. Please see my previous post.