JohannesBuchner / UltraNest

Fit and compare complex models reliably and rapidly. Advanced nested sampling.
https://johannesbuchner.github.io/UltraNest/
Other
142 stars 30 forks source link

Low live point number if likelihood is a plateau initially #77

Closed JohannesBuchner closed 1 year ago

JohannesBuchner commented 1 year ago

If the likelihood function returns a constant if some parameter space is excluded:

def myloglike(params):
    if params[2] > params[1]:
         return -1e100
    ...

Then after creating an initial min_num_live_points, all P plateau points are removed at once, and the run continues with min_num_live_points-P points.

However, min_num_live_points-P can be too few to run efficiently. For example, building a covariance matrix can fail.

A more convenient behaviour would be to

  1. widen the roots to min_num_live_points
  2. count how many root children have a likelihood equal to the lowest likelihood (=P)
  3. if all of them are equal, continue
  4. if all of them are different, continue
  5. otherwise, widen until there are min_num_live_points that are different to the lowest likelihood
JohannesBuchner commented 1 year ago

fixed by commits 27bb175f62b9f4f2f5b5219be52b15bbecf8981d and ec15d59f13f828bacd5271919545069042c9ce0d part of release 3.5.7