-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Open
Description
Hello,
I have been trying to pull off exercise 2.1 to create the cookie example without replacement but after failing miserably I checked the GIT repository for ThinkBayes2, and found a code with the solution for the second edition....
To my surprise I saw that I was on the correct track, however when trying to re-write the solution for the first version of ThinkBayes I still could not make it work...
if I use the following to set the hypos
bowl1=dict(vanilla=30,chocolate=10)
bowl2=dict(vanilla=20,chocolate=20)
pmf=Cookie([bowl1, bowl2])
I get:
TypeError: unhashable type: 'dict'
If I use the following (as cookie3.py in ThinkBayes2 )
bowl1=Hist(dict(vanilla=30,chocolate=10))
bowl2=Hist(dict(vanilla=20,chocolate=20))
I get :
AttributeError: 'Hist' object has no attribute 'Normalize'
I really want to see the solution to this, any hint or suggestion will be really appreciated!
Many thanks!
Leo
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels