From 993c3421f47fecce5b155154fd3d74be264cdded Mon Sep 17 00:00:00 2001 From: Ricardo Date: Tue, 26 Aug 2014 17:06:09 +0100 Subject: [PATCH] Noise parameters built depending on Y_metadata --- GPy/models/gp_heteroscedastic_regression.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/GPy/models/gp_heteroscedastic_regression.py b/GPy/models/gp_heteroscedastic_regression.py index 5a05fc98..19cb18d8 100644 --- a/GPy/models/gp_heteroscedastic_regression.py +++ b/GPy/models/gp_heteroscedastic_regression.py @@ -30,7 +30,9 @@ class GPHeteroscedasticRegression(GP): kernel = kern.RBF(X.shape[1]) #Likelihood - likelihoods_list = [likelihoods.Gaussian(name="Gaussian_noise_%s" %j) for j in range(Ny)] + #likelihoods_list = [likelihoods.Gaussian(name="Gaussian_noise_%s" %j) for j in range(Ny)] + noise_terms = np.unique(Y_metadata['output_index'].flatten()) + likelihoods_list = [likelihoods.Gaussian(name="Gaussian_noise_%s" %j) for j in noise_terms] likelihood = likelihoods.MixedNoise(likelihoods_list=likelihoods_list) super(GPHeteroscedasticRegression, self).__init__(X,Y,kernel,likelihood, Y_metadata=Y_metadata)