On Tue, 20 Mar 2018, at 13:54,
larryh...@gmail.com wrote:
> Hi All,
Hi, I'm sorry for the delay. I've tried to answer your questions as best I can.
> Recently I was trying to use the multi-level sampling mode to solve an
> inversion problem. I used to use MH sampling before, for multi-level I just
> replaced 'ip.solveWithBayesMetropolisHastings' with
> 'ip.solveWithBayesMLSampling()'. For the input file, I used the sample
> input as in example 'bimodal'.
>
> At first I tried with a 5-parameter problem and it works fine. When turn to
> a 9-parameter problem (my forward function accepts various parameter
> number) I got this error:
What is your likelihood function doing? Is it one of the QUESO examples or is this one of your own forward problems?
> Assertion `nowEffectiveSizeRatio <= (1.+1.e-8)' failed.
> nowEffectiveSizeRatio = -nan
> (1.+1.e-8) = 1
> effective sample size ratio cannot be > 1
> stats/src/MLSampling.C, line 2791, compiled Jan 29 2018 at 09:58:49
Do you have a small code snippet that can recreate this error?
> It yielded an output file 'rawChain_ml.m' which only contains 1 raw chain
> and corresponding likelihood and target data. In the successful run, I got
> 15 sets of chains (ip_ml_0_rawChain_unified ~ ip_ml_14_rawChain_unified).
>
> I didn't learn much about the multi-level sampling theory so I couldn't
> find any clue about how this comes. Can you help me with this problem?
Honestly, "multi-level" is probably not the best name for it. It should really be called "parallel tempering" or "simulated annealing".
If you can send me a small example (along with your input file) that recreates the problem I can try to poke around and see what's going on.
> I'm also confused about how to set the chain numbers, i.e. the number of
> output sets. Is it automatically decided by the program?
That's a great question. It really depends what you're trying to do. You might prefer to have more chains but run them all for a shorter length of time if you want something to finish more quickly. Or you might prefer to have fewer chains but run them for longer (to have 'more converged averages'). Again, it really depends. You might also want multiple chains as a mechanism to explore 'multiple modes'.
In the case of multilevel, the output files you referred to earlier (ip_ml_0_rawChain* ~ ip_ml_14_rawChain*) are referring to the chain at multiple 'levels' in the tempering scheme. How to choose the number of levels is a completely open problem. More levels will typically take longer to generate. The reason you might want more levels is to allow the chain to explore more in the parameter space. If you're not really mixing all that well, or you're stuck in a mode, it might actually be the case there is only one mode, in which case multi-level isn't really the best tool unless you need to compute the marginal likelihood.
> I apologize if this question is too stupid, I'm still learning the
> multi-level sampling method.
There are no stupid questions. Feel free to drop questions on this list. I'll try my best to answer them. I have a question for you, what do you think you need QUESO's multilevel sampling for? What exactly are you trying to do?
Hopefully I've helped. Let me know if you have more questions.
--
Damon McDougall
http://dmcdougall.co.uk
Institute for Computational Engineering Sciences
201 E. 24th St., Stop C0200
The University of Texas at Austin
Austin, TX 78712-1229