mirror of
https://github.com/SheffieldML/GPy.git
synced 2026-05-02 08:12:39 +02:00
Missing file
This commit is contained in:
parent
b839b9097e
commit
b2885e1882
2 changed files with 3 additions and 3 deletions
|
|
@ -19,3 +19,4 @@ from gp_heteroscedastic_regression import GPHeteroscedasticRegression
|
||||||
from ss_mrd import SSMRD
|
from ss_mrd import SSMRD
|
||||||
from gp_kronecker_gaussian_regression import GPKroneckerGaussianRegression
|
from gp_kronecker_gaussian_regression import GPKroneckerGaussianRegression
|
||||||
from gp_var_gauss import GPVariationalGaussianApproximation
|
from gp_var_gauss import GPVariationalGaussianApproximation
|
||||||
|
from one_vs_all_classification import OneVsAllClassification
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,3 @@
|
||||||
# Copyright (c) 2013, Ricardo Andrade
|
|
||||||
# Copyright (c) 2013, the GPy Authors (see AUTHORS.txt)
|
# Copyright (c) 2013, the GPy Authors (see AUTHORS.txt)
|
||||||
# Licensed under the BSD 3-clause license (see LICENSE.txt)
|
# Licensed under the BSD 3-clause license (see LICENSE.txt)
|
||||||
|
|
||||||
|
|
@ -31,7 +30,7 @@ class OneVsAllClassification(GP):
|
||||||
|
|
||||||
labels = np.unique(Y.flatten())
|
labels = np.unique(Y.flatten())
|
||||||
|
|
||||||
self.predictions = {}
|
self.results = {}
|
||||||
for yj in labels:
|
for yj in labels:
|
||||||
Ynew = Y.copy()
|
Ynew = Y.copy()
|
||||||
Ynew[Y.flatten()!=yj] = 0
|
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 = GPy.models.GPClassification(X,Ynew,kernel=kernel,Y_metadata=Y_metadata,inference_method=inference_method)
|
||||||
m.optimize()
|
m.optimize()
|
||||||
self.predictions[yj] = m.predict(X)
|
self.results[yj] = m.predict(X)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue