marionmari / pyGPs

pyGPs is a library containing an object-oriented python implementation for Gaussian Process (GP) regression and classification.
Other
213 stars 64 forks source link

Bug in RBFard derivative in train mode #28

Closed alexfeld closed 8 years ago

alexfeld commented 8 years ago

The bug is located in line https://github.com/marionmari/pyGPs/blob/master/pyGPs/Core/cov.py#L928 The current line is:

elif mode == 'train':
                tem = np.atleast_2d(x[:,der])/ell[der]
                A *= spdist.cdist(tem,tem,'sqeuclidean')

The above causes the cdist function to return [[0]]. The below fix works for me. It appears that I am using an older version of the code than is on in the master branch though. I got mine from the pip repository.

elif mode == 'train':
                tem = (np.atleast_2d(x[:,der])/ell[der]).T
                A *= spdist.cdist(tem,tem,'sqeuclidean')
alexfeld commented 8 years ago

My apologies, this is the same bug as #25