Issue #4 resolved

"Random variate x is -nan, but must be finite!"

Janto Dreijer
created an issue

After running the attached code I get the following error. Changing the dimension and upper bounds to something else sometimes works and sometimes it doesn't. Maybe it's a problem that surfaces when the system tries to somehow evaluate beyond the bounds?

{{{ terminate called after throwing an instance of 'boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<std::domain_error> >' what(): Error in function boost::math::cdf(const normal_distribution<d>&, d): Random variate x is -nan, but must be finite! Aborted }}}

Comments (10)

  1. Ruben Martinez-Cantin repo owner

    What surrogate function are you using? I'm working on a major bug that affects the core of the library and, right now, only the basic gaussian process is properly working.

    As soon as it get fixed, I will release a stable version.

  2. Ruben Martinez-Cantin repo owner

    Ok, there were 2 problems going on:

    - First, I had refactoried some parts of the code to make it consistent and easier to extend. The Python API was not completely updated. Now, I fixed it.

    - Second, the example function is not compatible with a Gaussian process and the noise level was too low. Also, 16 dimensions require much more initial points. Changing the kernel function (which shapes the GP) and changing the noise level, I was able to find the optimal up to 10 dimensions, but more than that, it becomes again instable (it's a problem of the math, not the code). Probably, with the other surrogate functions (which are not yet working) you could reach higher dimensions.

    As soon as I fix the bugs I will code some checks for math problems to make the library exit nicely and informative in those situations.

    Janto, if you don't mind, I have added the fixed version of your test file as an example.

  3. Ruben Martinez-Cantin repo owner

    Using the inv-gamma-normal surrogate model, the test file has been tested without problems up to 30 dimensions. Although in that case it requires a lot of initial points and iterations.

  4. Log in to comment