Until now, with some (but not all) very-near singular covariance matrices such as occurring in Gaussian Processes, the multivariate Gaussian RNG was completely utterly wrong. This was due to me forgetting a transpose of the result of the SVD when I added support for very-near singular matrices in da73e86525f9ff5f02ecad9ecfc1e930b0a8e409.
For my (weak) defence, Torch and Numpy have different conventions as to the transpose of the V matrix resulting from the SVD, and I got bitten.
This pull-request adds the missing transpose, and a test on a typical gaussian process example to detect any regression.
Until now, with some (but not all) very-near singular covariance matrices such as occurring in Gaussian Processes, the multivariate Gaussian RNG was completely utterly wrong. This was due to me forgetting a transpose of the result of the SVD when I added support for very-near singular matrices in da73e86525f9ff5f02ecad9ecfc1e930b0a8e409.
For my (weak) defence, Torch and Numpy have different conventions as to the transpose of the V matrix resulting from the SVD, and I got bitten.
This pull-request adds the missing transpose, and a test on a typical gaussian process example to detect any regression.