-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
chapter 3,the cluster prediction’s issue. #367
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Comments
I think this is the case as well. Earlier in the chapter he states:
and defines the variables as: with pm.Model() as model:
p1 = pm.Uniform('p', 0, 1)
p2 = 1 - p1
p = T.stack([p1, p2])
assignment = pm.Categorical("assignment", p,
shape=data.shape[0],
testval=np.random.randint(0, 2, data.shape[0])) where But later on he refers to the clusters as cluster 0 and cluster 1
Where cluster 0 is the lower-mean cluster in this case and cluster 1 is the higher-mean cluster: but then uses v = p_trace * norm_pdf(x, loc=center_trace[:, 0], scale=std_trace[:, 0]) > \
(1 - p_trace) * norm_pdf(x, loc=center_trace[:, 1], scale=std_trace[:, 1])
print("Probability of belonging to cluster 1:", v.mean()) I think this typo stems from the swtichup in syntax of "cluster 1 and cluster 2" to "cluster 0 and cluster 1" |
…t chapter. Addresses issue CamDavidsonPilon#367
the print “Probability of belongs to cluster 1:” should be “Probability of belongs to cluster 0:” ??
or i miss the meanings?
The text was updated successfully, but these errors were encountered: