Hi, I have recently discovered Nimble and have been playing with it over the last week and thought I would share my experiences so far.
I installed Nimble version 0.4, using RStudio with R ver 3.2.0 x64 on a WIN 10 machine with 64gb of ram. The package installed out of the box and I ran the examples with no issues. I am a long-time BUGS/JAGS user so thought I would throw one of my recent projects at it. Basically it consists of two (interacting) state space models. Anyone who has worked with SSMs in BUGS will probably know that mixing is often slow and these models can take a _long_ time to converge. JAGS was struggling with this model so I didn't hold out much hope for nimble
Well, my nimble model appeared to work pretty well. It ran as least as fast, if not faster than JAGS. I did not have to do any fiddling with initial values, like you often have to do with JAGS to get the thing to run. The most pleasing part was the model seemed to be converging quicker than in JAGS (less reliance on conjugate gibbs sampling?). So I am pretty happy with my nimble experience so far. I think there is heaps of upside for a platform like this which allows so much customisation of the sampling process. The fact I could apply block updates to certain nodes in my model so easily was fantastic. Also the ability to calculate log posterior densities for particular nodes (calcNodes,getLogProbs) opens up a whole new world for customising BUGS type models and using them in a whole bunch of different ways. In fact I reckon Nimble could be the future of Bayesian modelling and the logical successor to WinBUGS/JAGS. So congrats to the development team!
Obviously, nimble is very much a work in progress but a couple of things that I would like to see in future versions would be:
- At the moment it seems you can only return your posterior samples in one big matrix. This is fine for small models with few parameters, but when you have a more complex model with lots of multivariate nodes its a real pain. It would be good if nimble could return posterior samples as a list similar to functionality found in coda with one element for each monitored variable.
- The ability to run multiple chains in one call of the model (i.e. Model$run(n.iter= 1000, n.chains=3). Maybe allow thinning at this point too rather than have to specify this in configureMCMC
- The ability to update the posteriors and discard the samples accumulated up to that point. I realise you can use Model$run(n.iter, reset =F) but this retains all the samples. When you have a big model requiring a large burn-in, this can be problematic.
- A progress bar (like JAGS).
- Post processing functionality like in coda or tighter integration with coda
- I guess the library of samplers will be added to over time. It is great to see nimble has a basic particle filter and hope development of that (e.g. SMC, PMC) continues.
There were a few other minor issues. Sometimes the build and/or compilation process would fall over crashing my session but overall things were fairly stable.
keep up the good work!
regards
Dave