Giter VIP home page Giter VIP logo

gamble's People

Contributors

cobbal avatar rmculpepper avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

gamble's Issues

observation bug

This fails with the error observe: observation failed; expected: 1, got: #<void>:

(enumerate
 (defmem (f x) (discrete* '(red blue)))
 (define (g x)
   (case (f x) [(red) (bernoulli 1/2)] [(blue) (bernoulli 1/2)]))
 (observe (g 1) 1)
 (f 1))

But this works:

(enumerate
 (defmem (f x) (discrete* '(red blue)))
 (define (g x)
   (void (f x))
   (case (f x) [(red) (bernoulli 1/2)] [(blue) (bernoulli 1/2)]))
 (observe (g 1) 1)
 (f 1))

I suspect a problem in the instrumenter.

Installing with Racket 8.5

Hello,
I tried to install gamble using Racket 8.5 with raco pkg install git://github.com/rmculpepper/gamble and it produced the following error:

/home/nano/.racket/8.5/pkgs/gamble/gamble/private/instrument.rkt:341:33: pred: use does not match pattern: (pred y a)
  in: (pred obs-v)
  compilation context...:
   /home/nano/.racket/8.5/pkgs/gamble/gamble/tests/observe.rkt
  location...:
   /home/nano/.racket/8.5/pkgs/gamble/gamble/private/instrument.rkt:341:33
  context...:
   /home/nano/racket/collects/racket/private/stxparam.rkt:61:2
   [repeats 2 more times]
   /home/nano/racket/collects/compiler/private/cm-minimal.rkt:685:0: compile-zo*
   /home/nano/racket/collects/compiler/private/cm-minimal.rkt:451:15
   /home/nano/racket/collects/compiler/private/cm-minimal.rkt:440:12: build
   /home/nano/racket/collects/compiler/private/cm-minimal.rkt:411:0: maybe-compile-zo
   /home/nano/racket/collects/compiler/private/cm-minimal.rkt:209:0: compile-root
   /home/nano/racket/collects/compiler/private/cm-minimal.rkt:105:4
   /home/nano/racket/collects/setup/parallel-build.rkt:332:9
   /home/nano/racket/collects/setup/parallel-do.rkt:455:25
   /home/nano/racket/collects/setup/parallel-do.rkt:441:20: loop

hist function in gamble?

Hi,

Sorry if this is obvious, I'm new to DrRacket (I remember when it was DrScheme...), but where does the hist primitive for histograms, used in the gamble manual, come from? I run gamble code with #lang gamble which doesn't load this automatically.

Thanks.

Build errors

Tried to install this a few days ago and got error messages. I believe they are mostly documentation. If this package is still being actively maintained I could file a detailed report on the message, but I thought I would check the status first. Really anxious to try Racket for some probabilistic models and use in teaching, so I am anxious to learn if packages like this and drbayes are going to endure. Thanks.

Observation context not propagated through divison

The following program

#lang gamble

(observe (/ (uniform 1 2)) 0.6)

fails to compile with error

observe: expression is not observable;
 it does not sample in an observable context in: (/ (uniform 1 2))

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.