Open lionfish0 opened 7 years ago
If one enters the column of X which specifies the region without zero values, the python kernel dies. This is obviously a wrong input, but it would be nice if it failed less badly?
Example code:
import GPy import numpy as np X1 = np.random.rand(50)[:,None] X2 = np.random.rand(50)[:,None] Y1 = np.sin(X1*8.1)+np.random.randn(50,1)*0.15 Y2 = -np.sin(X2*8.1)+np.random.randn(50,1)*0.15 X1widx = np.c_[X1,np.ones(X1.shape[0])*2] #<<<<missing 0th values! X2widx = np.c_[X2,np.ones(X2.shape[0])*1] X = np.r_[X1widx,X2widx] Y = np.r_[Y1,Y2] kern = GPy.kern.RBF(1, lengthscale=80)**GPy.kern.Coregionalize(input_dim=1,output_dim=1, rank=1, active_dims=[0]) m = GPy.models.GPRegression(X,Y,kern) m.optimize()
I think it is due to the cython code for coregionalization. Maybe you can throw an exception before calling the cython code.
If one enters the column of X which specifies the region without zero values, the python kernel dies. This is obviously a wrong input, but it would be nice if it failed less badly?
Example code: