top | item 12193697

Doing Bayesian Data Analysis On the GPU: Examples

112 points| dragandj | 9 years ago |github.com | reply

28 comments

order
[+] dragandj|9 years ago|reply
Characteristic examples from the book Doing Bayesian Data Analysis 2nd edition [1] programmed in Clojure and OpenCL to run on the GPU. Much, much faster than Stan or JAGS!

The library used (Bayadera) is still pre-release, so much polishing is still needed, so this can be considered a preview. But, it is still very useful, and not more complex for programmers than the mainstream Bayesian tools.

[1] https://www.amazon.com/Doing-Bayesian-Data-Analysis-Second/d...

[+] feral|9 years ago|reply
Any hint how much faster? Not looking for defensible benchmarks, but are you talking an order of magnitude? Multiple orders?

Does it make the same probabilistic guarantees as the methods used in Stan etc? Or is it trading validity for speed?

[+] marmaduke|9 years ago|reply
It's not really comparable to stan if you're not computing gradients for HMC. Of course maybe for these models you don't need to.
[+] te|9 years ago|reply
Looks cool. Would love to see the "much, much faster" claim quantified. Both including and excluding compile times. Stan is neat, but the recompile time after every tweak to the model really got to be a drag. If you can improve on that, it would be a real win for me.
[+] thom|9 years ago|reply
This looks great, and very tastefully implemented on the Clojure side. Have you considered splitting out things like the quil utils?
[+] anon1253|9 years ago|reply
Just of out curiosity, how hard would it be to write a compiler that takes JAGS or STAN model files and compiles it to the s-exps needed to use the library?
[+] jsweojtj|9 years ago|reply
I must be missing something. Is there any output that we are supposed to be seeing? Plots of the fits or something?
[+] dragandj|9 years ago|reply
Yes. Run the tests in the REPL. Call (analysis) to only invoke the fits and get the timings, or call (display-sketch) and then (reset! all-data (analysis)) to see the plots. It is only done like that in these examples; for actual work, you are free to use any meaning combination of functions that you like.