Missing file

This commit is contained in:
Ricardo 2014-11-14 20:38:08 +00:00
parent b839b9097e
commit b2885e1882
2 changed files with 3 additions and 3 deletions

View file

@ -19,3 +19,4 @@ from gp_heteroscedastic_regression import GPHeteroscedasticRegression
from ss_mrd import SSMRD
from gp_kronecker_gaussian_regression import GPKroneckerGaussianRegression
from gp_var_gauss import GPVariationalGaussianApproximation
from one_vs_all_classification import OneVsAllClassification

View file

@ -1,4 +1,3 @@
# Copyright (c) 2013, Ricardo Andrade
# Copyright (c) 2013, the GPy Authors (see AUTHORS.txt)
# Licensed under the BSD 3-clause license (see LICENSE.txt)
@ -31,7 +30,7 @@ class OneVsAllClassification(GP):
labels = np.unique(Y.flatten())
self.predictions = {}
self.results = {}
for yj in labels:
Ynew = Y.copy()
Ynew[Y.flatten()!=yj] = 0
@ -39,4 +38,4 @@ class OneVsAllClassification(GP):
m = GPy.models.GPClassification(X,Ynew,kernel=kernel,Y_metadata=Y_metadata,inference_method=inference_method)
m.optimize()
self.predictions[yj] = m.predict(X)
self.results[yj] = m.predict(X)