jakeret / abcpmc

Approximate Bayesian Computation Population Monte Carlo
GNU General Public License v3.0
40 stars 19 forks source link

Multi-distance functions and their thresholds updating #20

Open JinfengM opened 2 years ago

JinfengM commented 2 years ago

First of all, thank you for your excellent job. However, I've run into two issues. Could you kindly help me in solving them? (1) I tried three samples many times, and found in the loop of "for pool in sampler.sample(prior, eps)", pool.dists was always null, therefore resulting in np.percentile(pool.dists, alpha, axis=0) raise an error. So I wonder whether it is normal, or it has something with multi-thread programming ?

(2)If I have three distance functions, should I specify three eps (thresholds)? I found in "Example of using two distance + thresholds in one ABC sampling run" , distance function returns two values within a list object, and eps_start is set to [1.0, 1.0]. I guess if I have three distance functions, I have to specify three eps_start like [1.0,1.0,1.0].I noticed that eps is updated in the code "eps.eps = np.percentile(pool.dists, alpha, axis=0) ", the three eps are synchronously updated with same scaling control factor-alpha. If I want to specify three various scaling control factor, I should update the eps.eps object? Thank you.