-
Notifications
You must be signed in to change notification settings - Fork 15
Description
Hi @dm13450, I was using the dirichletprocess package twice on the same data set, I called the two objects dp, and dp2 (see below).
I checked convergence following your approach on your blog. All parameters seemed to converge with Gelman Rubin Diagnostics well below 1.1. The summary of the two objects shows a mean number of clusters of 5.26 and 5.22, respectively. However, when I print out the number of clusters per object, it shows that dp has 5 clusters (which I would expect from the average of 5.26), but it also shows that dp2 has only 2 clusters. Can you explain why that is?
print(dp)
Dirichlet process object run for 5000 iterations.
Mixing distribution mvnormal
Base measure parameters c(0, 0), c(1, 0, 0, 1), 2, 2
Alpha Prior parameters 2, 4
Conjugacy conjugate
Sample size 28
Mean number of clusters 5.26
Median alpha 0.84
dp2
Dirichlet process object run for 5000 iterations.
Mixing distribution mvnormal
Base measure parameters c(0, 0), c(1, 0, 0, 1), 2, 2
Alpha Prior parameters 2, 4
Conjugacy conjugate
Sample size 28
Mean number of clusters 5.22
Median alpha 0.83
dp$numberClusters
[1] 5
dp2$numberClusters
[1] 2`