Re: [racket] Randomized bisimulation tests and Metropolis-Hastings random walk

2013-01-07 Thread Neil Toronto
On 01/06/2013 08:38 AM, Sam Tobin-Hochstadt wrote: On Sat, Jan 5, 2013 at 7:31 PM, Neil Toronto wrote: Last time I checked Hari's RAList implementation, it was broken, so I started my own from scratch (which is what I worked from just now). He's fixed it, though. I could run some benchmarks, bu

Re: [racket] Randomized bisimulation tests and Metropolis-Hastings random walk

2013-01-06 Thread Matthias Felleisen
On Jan 6, 2013, at 10:38 AM, Sam Tobin-Hochstadt wrote: > Is the use of index types a fundamental refactoring, or something that > could be added to Hari's code? > > I ask because having 3+ different functional random-access data > structures seems like a loss for Racket code interoperability o

Re: [racket] Randomized bisimulation tests and Metropolis-Hastings random walk

2013-01-06 Thread Sam Tobin-Hochstadt
On Sat, Jan 5, 2013 at 7:31 PM, Neil Toronto wrote: > Thanks for the pointers! > > I can't use David Van Horn's because it's untyped, and I need to use this in > Typed Racket. Well, you might consider porting his code to Typed Racket. I hear it was designed for that. ;) > Last time I checked Ha

Re: [racket] Randomized bisimulation tests and Metropolis-Hastings random walk

2013-01-05 Thread Neil Toronto
Thanks for the pointers! I can't use David Van Horn's because it's untyped, and I need to use this in Typed Racket. (No polymorphic, opaque types, and if I use the `struct' form in `require/typed', I'd get the performance problems I just wrote about on the dev list.) Last time I checked Hari

Re: [racket] Randomized bisimulation tests and Metropolis-Hastings random walk

2013-01-04 Thread Jeremiah Willcock
On Fri, 4 Jan 2013, Neil Toronto wrote: I expect lookups and in-place updates with the most frequency. The other operation I need to be fast is head or tail insertion (it doesn't matter which), but not nearly as much as the other two. Have I picked the right data structure? How long are the

Re: [racket] Randomized bisimulation tests and Metropolis-Hastings random walk

2013-01-04 Thread Neil Toronto
I expect lookups and in-place updates with the most frequency. The other operation I need to be fast is head or tail insertion (it doesn't matter which), but not nearly as much as the other two. Have I picked the right data structure? Neil ⊥ On 01/04/2013 06:39 PM, Jeremiah Willcock wrote: H

Re: [racket] Randomized bisimulation tests and Metropolis-Hastings random walk

2013-01-04 Thread Jeremiah Willcock
How long are these lists going to be, and how many insertions/deletions will occur relative to the number of element lookups and in-place updates? Would it make sense to consider other random-access data structures (in particular, growable vectors) instead of lists? -- Jeremiah Willcock On Fr

Re: [racket] Randomized bisimulation tests and Metropolis-Hastings random walk

2013-01-04 Thread Neil Toronto
My doctoral research is to beat the crap out of STAN, WinBUGS, etc., etc., by leveraging information you can only get by writing a compiler for a language with a formal definition. There's no Bayesian DSL that can answer queries with arbitrary conditions like "X^2+Y^2 = 1.2". MCMC fails specta

Re: [racket] Randomized bisimulation tests and Metropolis-Hastings random walk

2013-01-04 Thread Ray Racine
MCMC with Gibbs Sampling and MH for straightforward stuff is straightforward, but the subtitles of underflow, use log space or not etc are something you guys know quite a bit more about than I do. FWIW, a few months ago I was doing some custom Racket coded for straightforward Gibbs (mainly) and MH

Re: [racket] Randomized bisimulation tests and Metropolis-Hastings random walk

2013-01-04 Thread Robby Findler
So maybe I should just have a smaller size bound? (the 10 in the 'gen-exp' function) Really, perhaps, what I should do is not have a smaller size bound but instead just make the number of tests I do (32 in the currently pushed thing) depend on how long I've been testing. Robby On Fri, Jan 4, 20

Re: [racket] Randomized bisimulation tests and Metropolis-Hastings random walk

2013-01-04 Thread Neil Toronto
On 01/04/2013 03:06 PM, Robby Findler wrote: Very cool! I've run into this problem a few times. And here's an example where it happens right now http://drdr.racket-lang.org/26021/collects/tests/future/random-future.rkt Yeah, your problem is very similar. The difference is that in my case

Re: [racket] Randomized bisimulation tests and Metropolis-Hastings random walk

2013-01-04 Thread Robby Findler
Very cool! I've run into this problem a few times. And here's an example where it happens right now http://drdr.racket-lang.org/26021/collects/tests/future/random-future.rkt Robby On Fri, Jan 4, 2013 at 3:45 PM, Neil Toronto wrote: > I get excited about applying statistics to programmin

Re: [racket] Randomized bisimulation tests and Metropolis-Hastings random walk

2013-01-04 Thread Sam Tobin-Hochstadt
Have you tried testing your implementation against either David Van Horn's implementation (not in TR) [1], or Hari's implementation (in TR) [2]? Or against VLists (also in Hari's PFDs package)? [1] https://github.com/dvanhorn/ralist [2] https://github.com/takikawa/tr-pfds/tree/master/data/ralist

[racket] Randomized bisimulation tests and Metropolis-Hastings random walk

2013-01-04 Thread Neil Toronto
I get excited about applying statistics to programming. Here's something exciting I found today. I'm working on a Typed Racket implementation of Chris Okasaki's purely functional random-access lists, which are O(1) for `cons', `first' and `rest', and basically O(log(n)) for random access. I wa