I'm struggling to implement the following model in R:

enter image description here

When I generate H, I get a matrix. For the DP, I am using the Chinese Restaurant Process (CRP). However, I'm not sure how to incorporate a matrix, $H$, into the CRP. I only have inputs for number of customers and my dispersion/concentration parameter, alpha. The output of my CRP is the table assignments. For example, 100 customers will be assigned to maybe 15 different tables. I know I should use these tables to weight my normal distributions, but I'm not sure what this means.

Any guidance would be helpful.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.