probmods / chapters

The online textbook Probabilistic Models of Cognition
https://probmods.org
163 stars 27 forks source link

Histogram way too big #26

Closed longouyang closed 11 years ago

longouyang commented 11 years ago

In the joint lung-cancer / TB inference example on the conditioning page, the resulting histogram is humongous - each bar takes up way too much space. NB: this example takes a while to run.

longouyang commented 11 years ago

Here is a much faster example that still gives the error:

(define samples
  (mh-query
   1000 1

   (define x '(#t #t))
   x
   #t))

(hist samples "blah")
ngoodman commented 11 years ago

or even:

(hist (repeat 100 (lambda () (list (flip) (flip)))) )

feste commented 11 years ago

Yep. Sorry about that. Getting unique elements of lists of lists is different, and I forgot that when I changed something today.

On Wed, Sep 25, 2013 at 7:50 PM, ngoodman notifications@github.com wrote:

or even:

(hist (repeat 100 (lambda () (list (flip) (flip)))) )

— Reply to this email directly or view it on GitHubhttps://github.com/probmods/chapters/issues/26#issuecomment-25140515 .

longouyang commented 11 years ago

Looks like Erin fixed this in 9b405f5c2d0e966041dc7453f34b0027bd953f9a