Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chapter 3, Clustering example, creating model. #84

Closed
djole opened this issue Jun 12, 2013 · 3 comments
Closed

Chapter 3, Clustering example, creating model. #84

djole opened this issue Jun 12, 2013 · 3 comments

Comments

@djole
Copy link

djole commented Jun 12, 2013

I have a quick question about the
initialization of the model class in the Chapter 3, clustering example.
Why are observations not included in the
list of parameters in mc.Model?

#and to combine it with the observations:
observations = mc.Normal( "obs", center_i, tau_i, value = data, observed = True )

#below we create a model class
model = mc.Model( [p, assignment, taus, centers ] )
@CamDavidsonPilon
Copy link
Owner

It is a mistake, unfortunately. Although the MCMC probably runs fine (can you confirm?), it is best practice to include it in the Model class along with the other variables. Thanks for pointing this out @djole

@djole
Copy link
Author

djole commented Jun 12, 2013

It runs fine and the graphs seem consistent.
image
image2

If it's the same, how come PyMC knows the likelihood distribution?
Is it by checking child variables of the variables included in the model?

BTW, thanks for all the good work :)

@CamDavidsonPilon
Copy link
Owner

Yup looks good.

Is it by checking child variables of the variables included in the model?

is likely correct. Thanks for the contribution!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants