jtobin / mwc-probability

A probability distribution type layered on top of mwc-random.
https://hackage.haskell.org/package/mwc-probability
MIT License
8 stars 7 forks source link

Add implementation of Chinese Restaurant process #17

Closed ocramz closed 4 years ago

ocramz commented 4 years ago

I can't find my notes on the PY process and I'm not sure anymore its implementation is correct. However it was easy to adapt to the CRP

jtobin commented 4 years ago

Marco -- I'll take a look post-haste. Also, FWIW I have some old R implementations of these things kicking around in another repo, which might be useful for validation/verification. Similarly I'm not 100% sure about their correctness, but I think they should be about right.

ocramz commented 4 years ago

@jtobin would you like me to figure out a distribution test for this process before merging? It's basically a straight copy from Griffiths, Ghahramani 2005 - Infinite Latent Feature Models and theIndian Buffet Process (https://cocosci.princeton.edu/tom/papers/ibptr.pdf)

jtobin commented 4 years ago

Marco -- sorry for the delay, I've just been busy. LGTM! I only tweaked a couple of (mostly stylistic) things. :+1: :+1: