--
You received this message because you are subscribed to the Google Groups "nimble-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nimble-users+unsubscribe@googlegroups.com.
To post to this group, send email to nimble...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/nimble-users/51412599-109b-48cf-9a9e-be00b7b239d9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Wenna, thanks for your interest in NIMBLE, and sending the question. I'm not an expert on the space usage, or whether that's the problem, but I can help you out with re-starting the MCMC from "where it left off". This can be done by restoring the final model parameter values into the model object, and also restoring the "state" variables internal to each sampler function, within the MCMC. This would be a tiny bit tricky, but it can certainly be done. Then you're restart the MCMC using the argument "reset = FALSE", so it wouldn't reset the internal state of all the sampling algorithms, but instead they'd pick up from where they left off. I'm happy to help you through this process, if you want.Thanks again for your interest in NIMBLE. Cheers,
Daniel
On Mon, Jan 22, 2018 at 5:35 PM, <wenn...@gmail.com> wrote:
Hi everyone,I am currently fitting some Bayesian models on a computing cluster and, since the models are too big, the MCMC iterations cannot be finished within the maximum allowed wall time (2 weeks). My question is: is there a way for me to save the finished the MCMC iterations and then restart the MCMC algorithm again at where it was left in another job? Or, in general, does anyone have any suggestions to speed up the MCMC/model building process?PS: My models have around 5000 - 20,000 parameters and my data set is about 1400 * 900. However, I don't think it's the model/data set that is causing this slow mixture, but NIMBLE is taking too much space during this process. But my intuition might be wrong here... Any thoughts on this anyone?Thanks,Wenna
--
You received this message because you are subscribed to the Google Groups "nimble-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nimble-users...@googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to nimble-users+unsubscribe@googlegroups.com.
To post to this group, send email to nimble...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/nimble-users/c1472895-e75e-4509-b805-13e428c4a871%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/nimble-users/CABeTmqgSfg%3D8yL6NYDmT%2B_vFEi0Dx3g4Rkw2C3-E_Q4RG98qmQ%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/nimble-users/c1472895-e75e-4509-b805-13e428c4a871%40googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "nimble-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nimble-users...@googlegroups.com.
To post to this group, send email to nimble...@googlegroups.com.
Hi Daniel,
Thanks again for the document. It is working now, but I still have two questions:
> head(samples_continued)
beta[1] beta[2] mu sigma
[1,] 1.346531 0.2780219 2.751533 0.06776875
[2,] 1.373949 0.2780219 2.708912 0.05720470
[3,] 1.368100 0.2780219 2.731302 0.07306114
[4,] 1.397031 0.2482833 2.710105 0.06642219
[5,] 1.417554 0.2482833 2.691461 0.05077806
[6,] 1.355736 0.2482833 2.701397 0.04253383
> set.seed(0)
> Cmcmc$run(20000)
|-------------|-------------|-------------|-------------|
|-------------------------------------------------------|
NULL
>
> samples <- as.matrix(Cmcmc$mvSamples)
> samples[9995:10005,]
beta[1] beta[2] mu sigma
[1,] 1.394315 0.2578996 2.709307 0.03237251
[2,] 1.399039 0.2502140 2.724426 0.05516978
[3,] 1.400995 0.2494896 2.728632 0.03437194
[4,] 1.400995 0.2494896 2.719170 0.03925602
[5,] 1.381995 0.2288096 2.741263 0.05120657
[6,] 1.381995 0.2780219 2.716613 0.05292085
[7,] 1.381995 0.2220797 2.700665 0.04997873
[8,] 1.381995 0.2433144 2.690273 0.08012158
[9,] 1.381995 0.2410102 2.669353 0.07388723
[10,] 1.381995 0.2388559 2.696224 0.04560240
[11,] 1.331974 0.2388559 2.694611 0.03243129
I apologize if I sound too nitpicky here; I just wanted to understand the mechanism behind this pausing and restarting thing better before I actually use it.
Thanks,
Wenna
From: Daniel Turek
Sent: Wednesday, January 24, 2018 9:10 PM
To: wenn...@gmail.com
Cc: nimble-users
Subject: Re: Pausing and Restarting MCMC iterations / NIMBLE Efficiency
Thanks for bringing this to my attention, Wenna. There were a few minor details overlooked, the root cause being that the "reset = FALSE" option of the MCMC was designed to continue an MCMC that had already been run. So doing this alternate use of it, a few of the initialization steps were missed.
I've updated the Restarting a NIMBLE MCMC document. There's one functional change in a new code block, near the end, which restores things into the compiled MCMC. There's now also output at the end, showing the continued samples, and correct behaviour. It should work without any problems now.
Cheers!
Danie
To view this discussion on the web visit https://groups.google.com/d/msgid/nimble-users/986669b5-b096-4bdf-9ba4-de179c7dfedb%40googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to nimble-users+unsubscribe@googlegroups.com.
To post to this group, send email to nimble...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/nimble-users/986669b5-b096-4bdf-9ba4-de179c7dfedb%40googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to nimble-users+unsubscribe@googlegroups.com.
To post to this group, send email to nimble...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/nimble-users/986669b5-b096-4bdf-9ba4-de179c7dfedb%40googlegroups.com.
It’s working perfectly now! Thank you so much Daniel!!!
To view this discussion on the web visit https://groups.google.com/d/msgid/nimble-users/986669b5-b096-4bdf-9ba4-de179c7dfedb%40googlegroups.com.