seed-related NaNs & sampling

1 view
Skip to first unread message

Bob Carpenter

unread,
Jun 6, 2012, 1:56:49 PM6/6/12
to stan...@googlegroups.com
We have a problem with random inits on some seeds
in the BUGS/vol1/salm model. For some seeds, the
first eval is NaN and Stan then continues to reject
and stay in NaN-land for the entire chain.

There's really no way we can escape a situation where
the first eval is NaN.

We could reseed, but I think we'd need to do this
deterministically (based on the initial seed;
say adding 1M to it) so that when given the seed
the next time, the sampler does the same thing.

For restarting, we're going to dump out a copy of
the current state (which when used as the seed next
time lets you start where you left off).

- Bob

Marcus Brubaker

unread,
Jun 6, 2012, 3:24:29 PM6/6/12
to stan...@googlegroups.com
One easy way to reseed deterministically is to use a random integer drawn using the current seed as the new seed.

Alternatively, you could draw inits until the first eval isn't NAN before using it as a starting point for the Markov chain.  In fact, even if you reseed you'd still need to redraw the initial sample so you'd do this anyway and the reseeding is probably not necessary.

Cheers,
Marcus
Reply all
Reply to author
Forward
0 new messages