lawmurray / Birch

A probabilistic programming language that combines automatic differentiation, automatic marginalization, and automatic conditioning within Monte Carlo methods.
https://birch-lang.org
Apache License 2.0
112 stars 14 forks source link

Add Latent Dirichlet Allocation model to the examples #13

Closed gizemcaylak closed 3 years ago

gizemcaylak commented 3 years ago

This pull request adds Latent Dirichlet Allocation model to the examples. It is tested with a toy example and a dataset that contains the abstracts of NIPS papers (2017). The link to the NIPS papers dataset can be found in the README.md.

lawmurray commented 3 years ago

This is great, thanks @gizemcaylak. I'll review yet, but on first glance seems you solved the size() issue we discussed by serializing the input file? That seems like a good solution.

No concerns on the failed tests by the way, there are currently some config issues.

gizemcaylak commented 3 years ago

This is great, thanks @gizemcaylak. I'll review yet, but on first glance seems you solved the size() issue we discussed by serializing the input file? That seems like a good solution.

Thanks! Yes, by looking at the existing examples, I thought it would be nicer to do that, noting that the number of steps is indicated in the config.

lawmurray commented 3 years ago

Thanks again for this one @gizemcaylak! Now merged after a major update to Birch yesterday. I'll do some additional debugging in the coming days to fix any backward compatibility issues for this example.