Open glorwlin opened 6 years ago
I am also using this code to build multi-fidelity GP and encounter the same problem. My data has 30 dimensions and I build GP using each dimension data independently. Unfortunately, the LinAlgError occurs at random dimension even though the data has not changed. I am so confused about that. Have you fixed the problem?
I am also using this code to build multi-fidelity GP and encounter the same problem. My data has 30 dimensions and I build GP using each dimension data independently. Unfortunately, the LinAlgError occurs at random dimension even though the data has not changed. I am so confused about that. Have you fixed the problem?
Unfortunately, no. I switched to another package in the end. Sorry that I could not help.
I am also using this code to build multi-fidelity GP and encounter the same problem. My data has 30 dimensions and I build GP using each dimension data independently. Unfortunately, the LinAlgError occurs at random dimension even though the data has not changed. I am so confused about that. Have you fixed the problem?
Unfortunately, no. I switched to another package in the end. Sorry that I could not help.
Do you mind telling me which package did you switched to? Maybe I should have a try. Thanks a lot!
Hi, I ended up translating the codes into GPflow and continued everything from there.
Hi, I ended up translating the codes into GPflow and continued everything from there.
Thank you!
Hi, I ended up translating the codes into GPflow and continued everything from there.
Do you mind sharing me with the tutorial code for multi-fidelity GP (or deep GP) using GPflow. My email is zheng992328@163.com. Thank you very much!
I run into this same issue. Based on the discussion above, switching to GPflow solves the problem. Could anyone point me to some tutorial? Thanks, Xiaokang
One workaround is to set the maxtries to higher number such as 10 in the jitchol method (GPy/util/linalg.py). If it still happens, catch the exception and return a random candidate can be also fine.
Also happening to my code too often for me to overlook it. By returning a random candidate, you mean returning an entire random matrix L? Or where exactly would you catch this exception? Example code would be helpful!
Initially things were working fine for me and only when I started to prohibit drawing certain points using the ignore_x
parameter I ran into these troubles. I used some randomness here for testing and for mathematical reasons now I see it was not a good idea.
@icdishb thank you very much for your hint. For my instance, this did not solve the problem for me. But still, could it be possible to move the maxtries
parameter up so that I don't need to do monkey patching? Btw, this was my temporary solution that worked according to the stack trace:
# see https://github.com/SheffieldML/GPy/issues/660
import GPy
previous_jitchol = GPy.util.linalg.jitchol
GPy.util.linalg.jitchol = lambda A: previous_jitchol(A, maxtries=100)
I experienced the same LinAlg-error. Changing the maxtries=100
didn't help much. I changed the L = linalg.cholesky(A + np.eye(A.shape[0]) * jitter, lower=True)
, which is using the scipy.linalg.cholesky()
function to it's numpy-equivalent np.linalg.cholesky(A + np.eye(A.shape[0]) * jitter)
. This resolved the issue for me
I experienced the same LinAlg-error. Changing the
maxtries=100
didn't help much. I changed theL = linalg.cholesky(A + np.eye(A.shape[0]) * jitter, lower=True)
, which is using thescipy.linalg.cholesky()
function to it's numpy-equivalentnp.linalg.cholesky(A + np.eye(A.shape[0]) * jitter)
. This resolved the issue for me
This works for me.
Specifically, I done the following steps:
1.) Download this Github repository and unzip it
2.) In the root folder, run pip install -e .\
3.) Open file GPy/util/linalg.py, in function jitchol(), change
L = linalg.cholesky(A + np.eye(A.shape[0]) * jitter, lower=True)
to
L = np.linalg.cholesky(A + np.eye(A.shape[0]) * jitter)
Normalizing outputs or adding Gaussian noise could help.
Hi,
I have a weird problem while using GPy in HPC (Sharc). When I tried to run a deep GP using a very small training dataset (500 points), GPy kept giving me the following error during the optimization:
However, the exact same code worked well with my local computer. The error seemed to appear after the 9/30 optimization run for my "train level two":
I have checked the version of GPy in both my computer and the HPC environment - they are both the latest version. What could be the potential cause of such problem?
Here I attach the entire code that I use: