Open galfaroi opened 6 years ago
Could you send your example, so we can see what is happening?
On 21. Mar 2018, at 09:45, German Alfaro notifications@github.com wrote:
Hi,
I am trying to do a multi dimensional input for a classification GP, it works very well for one dimension, but as soon I add another feature gives me a hashable error, I am pretty sure is something simple, but I cannot find a working example Thanks!
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.
Sure,
N = X_train.shape[0] # number of data points
D = X_train.shape[1] # number of features
k = GPy.kern.RBF(input_dim=D, variance=7., lengthscale=0.2)
model = GPy.models.GPClassification(X_train, y_train, kernel=k)
`
Until there it works, but when I do m.predict, also tried "GPy.models.SparseGPClassification":
probs = model.predict(X_test)
I got this error:
TypeErrorTraceback (most recent call last)
Might X_test be a pandas array? Then try to convert it to a simple numpy array before giving it to the model.
Thank you I did and it works!
On Thu, Mar 22, 2018 at 1:25 PM, Max Zwiessele notifications@github.com wrote:
Might X_test be a pandas array? Then try to convert it to a simple numpy array before giving it to the model.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/SheffieldML/GPy/issues/612#issuecomment-375445391, or mute the thread https://github.com/notifications/unsubscribe-auth/AF8zuOGDN6F0n9MzdSixdlLmIdKC_xuYks5thAiigaJpZM4SzLpF .
Hi,
I am trying to do a multi dimensional input for a classification GP, it works very well for one dimension, but as soon I add another feature gives me a hashable error, I am pretty sure is something simple, but I cannot find a working example Thanks!