rmculpepper / gamble Goto Github PK
View Code? Open in Web Editor NEWProbabilistic Programming
License: BSD 2-Clause "Simplified" License
Probabilistic Programming
License: BSD 2-Clause "Simplified" License
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.
Internally, the solver already knows about pinned db entries, but I need to add the #:cond
keyword and observe-at
method.
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))
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.
Acronym "HMC" is used in the "Samplers and Solvers" section without being defined.
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.
Ideally, share logic with mh-sampler
.
the syntax definition uses 'sampler' but the text below uses 's'.
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
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.