GPLVM RuntimeError: cholesky_cpu: U(29,29) is zero, singular U

Hi everyone,
I’m a new user of Pyro and I need some help. I’m trying to make a dimensionality reduction using the algorithm in the ( tutorial 1 from the paper GrandPrix 2019. The problem that I’m having is that when I run the code for my data (803 rows, 14 columns ) this error always shows up:

Luu = Kuu.cholesky()
RuntimeError: cholesky_cpu: U(29,29) is zero, singular U.
Trace Shapes:
Param Sites:
Sample Sites:
SGPR/SparseGPRegression/X dist | 803 2
value | 803 2

I’m using the latest version of Pyro. Can you have any suggestions??
Thanks in advance.

Hi @Agostino-87, I often face Cholesky issue if I forget to preprocess data (through standardizing or normalizing). GP kernel will easily become singular if the scales of input features vary a lot. If you already preprocess data but still get Cholesky issue, then you might try

  • increase noise to a larger value than the default one 1e-6
  • set default tensor type to float64.
1 Like

Hi @fehiepsi thanks so much for the reply. Sorry for being late in the answering. Thanks to your comment I’ve solved the issue, but unfortunately when I try to run the code with another type of data another error comes up. This is an issue with the ‘loc’ parameter that has an invalid values. The error says:

raise ValueError (’‘The parameter {} has invalid values’’.format(param))
ValueError: The Paramenter loc has invalid values
Trace Shapes:
Param Sites:
Sample Sites:

Thank you so much for your time and reply.

Hi @Agostino-87, I think the loc parameter is getting NaN value. Maybe the training process is unstable for your data.