dirichlet-process
dirichlet-process copied to clipboard
From tables to table assignments
Really nice post. I had to look at the code several times before I realized that the probability of sitting at table k
, which is n_k/(n+a)
, was smartly taken into account by organizing the problem as uniform picking from an array of table assignments. Perhaps other people see that directly, but it took me some time! Maybe you can spend a few more lines on that?