Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AssertionError: ('None of the live points satisfies the current region!'...) #74

Open
garvitagarwal290 opened this issue Aug 30, 2022 · 3 comments

Comments

@garvitagarwal290
Copy link

  • UltraNest version: 3.4.6
  • Python version: 3.9.7
  • Operating System: Rocky Linux 8.5 (Green Obsidian)

Description

I have multiple similar time series data and I'm attempting to fit a model with 15 parameters to each of them. The modeling works okay for most of them, however for a few cases, after running for 24+ hours the modeling quits with the following error traceback:

  File "/tiara/home/gagarwal/code/modeling.py", line 313, in <module>
    result_planet_only = sampler.run(min_num_live_points=2000)
  File "/tiara/home/gagarwal/.conda/envs/exomoon_project/lib/python3.9/site-packages/ultranest/integrator.py", line 2173, in run
    for result in self.run_iter(
  File "/tiara/home/gagarwal/.conda/envs/exomoon_project/lib/python3.9/site-packages/ultranest/integrator.py", line 2433, in run_iter
    u, p, L = self._create_point(Lmin=Lmin, ndraw=ndraw, active_u=active_u, active_values=active_values)
  File "/tiara/home/gagarwal/.conda/envs/exomoon_project/lib/python3.9/site-packages/ultranest/integrator.py", line 1664, in _create_point
    assert self.region.inside(active_u).any(), \
AssertionError: ('None of the live points satisfies the current region!', 2.7015914916992188, array([[4.99914554e-01, 5.92656748e-01, 6.34467149e-01, ...,
        1.09822905e-05, 4.29756997e-01, 2.14978587e-01],
       [4.99938209e-01, 6.23359099e-01, 6.32904663e-01, ...,
        4.55814845e-04, 4.39301514e-01, 2.24539145e-01],
       [4.99943991e-01, 6.37350379e-01, 6.33161747e-01, ...,
        7.46414429e-04, 4.49102417e-01, 2.17475637e-01],
       ...,
      <more numbers>
       [4.99932517e-01, 6.17887768e-01, 6.33362139e-01, ...,
        1.11410889e-03, 4.37750825e-01, 2.22208449e-01],
       [4.99915020e-01, 6.59751641e-01, 6.32226065e-01, ...,
        6.59674898e-05, 4.58875175e-01, 2.15891624e-01],
       [4.99936442e-01, 5.87100775e-01, 6.34466240e-01, ...,
        2.10860063e-04, 4.32887061e-01, 2.14685347e-01]]))

Before quitting, the modeling starts printing the following below the evolving posteriors:

[ultranest] Found a lot of clusters: 1303 (344 with >1 members)454] | it/evals=157250/1327175033 eff=21.5490% N=1974

For now, I am trying to use a smaller subset of my time series. This has worked in a few cases, but others are still showing this error.
Can you please help me understand why I might be getting this error? I guess this can be avoided by changing my modeling settings, but I don't know how exactly.

@JohannesBuchner
Copy link
Owner

An ellipsoid is built based on the live points, a bunch of new points are sampled, the ellipsoid is updated, and so forth.
Every time a new point is sampled, however, the ellipsoid is also re-centered to the mean of the live points.

Before a new point is sampled, a check is performed to see whether the existing live points are still inside the region. The check is pretty weak: At least one live point needs to be inside. The error occurs when none of the live points satisfy the region check.

For numerical reasons it can sometimes happen in high-dimensional spaces, that all of the live points are outside the region.
The fact that you see a extremely large number of clusters, most of them spurious, is another sign of numerical issues.

These can be caused by the sampler (is it the step sampler or the default MLFriends?) is failing.

Try using run(region_class=ultranest.mlfriends.SimpleRegion) with a step sampler.

@garvitagarwal290
Copy link
Author

Hi. I am using the step sampler 'RegionSliceSampler'.
I will try the region class modification you suggested. But can there be something wrong about my data that may cause this problem?

@JohannesBuchner
Copy link
Owner

More likely either not enough live points or too few steps (nsteps).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants