From 7c8de7fff83e00d5e30e8f1a58569b1637f820ca Mon Sep 17 00:00:00 2001 From: mzwiessele Date: Mon, 7 Jul 2014 16:00:58 -0700 Subject: [PATCH] [whitespaces] --- GPy/core/parameterization/parameter_core.py | 2 -- GPy/core/parameterization/priors.py | 8 ++++---- GPy/examples/dimensionality_reduction.py | 2 +- GPy/inference/latent_function_inference/var_dtc.py | 1 - 4 files changed, 5 insertions(+), 8 deletions(-) diff --git a/GPy/core/parameterization/parameter_core.py b/GPy/core/parameterization/parameter_core.py index 8c23e475..e359409e 100644 --- a/GPy/core/parameterization/parameter_core.py +++ b/GPy/core/parameterization/parameter_core.py @@ -751,8 +751,6 @@ class OptimizationHandlable(Indexable): Transform the gradients by multiplying the gradient factor for each constraint to it. """ - if self.has_parent(): - return g [np.put(g, i, g[i] * c.gradfactor(self.param_array[i])) for c, i in self.constraints.iteritems() if c != __fixed__] if self._has_fixes(): return g[self._fixes_] return g diff --git a/GPy/core/parameterization/priors.py b/GPy/core/parameterization/priors.py index 29adc923..ddc4d02f 100644 --- a/GPy/core/parameterization/priors.py +++ b/GPy/core/parameterization/priors.py @@ -76,11 +76,11 @@ class Uniform(Prior): o = super(Prior, cls).__new__(cls, lower, upper) cls._instances.append(weakref.ref(o)) return cls._instances[-1]() - + def __init__(self, lower, upper): self.lower = float(lower) self.upper = float(upper) - + def __str__(self): return "[" + str(np.round(self.lower)) + ', ' + str(np.round(self.upper)) + ']' @@ -93,7 +93,7 @@ class Uniform(Prior): def rvs(self, n): return np.random.uniform(self.lower, self.upper, size=n) - + class LogGaussian(Prior): """ Implementation of the univariate *log*-Gaussian probability function, coupled with random variables. @@ -246,7 +246,7 @@ class Gamma(Prior): """ Creates an instance of a Gamma Prior by specifying the Expected value(s) and Variance(s) of the distribution. - + :param E: expected value :param V: variance """ diff --git a/GPy/examples/dimensionality_reduction.py b/GPy/examples/dimensionality_reduction.py index 7893a13e..1932691c 100644 --- a/GPy/examples/dimensionality_reduction.py +++ b/GPy/examples/dimensionality_reduction.py @@ -296,7 +296,7 @@ def bgplvm_simulation_missing_data(optimize=True, verbose=1, from GPy.models import BayesianGPLVM from GPy.inference.latent_function_inference.var_dtc import VarDTCMissingData - D1, D2, D3, N, num_inducing, Q = 1000, 5, 8, 400, 3, 4 + D1, D2, D3, N, num_inducing, Q = 13, 5, 8, 400, 3, 4 _, _, Ylist = _simulate_sincos(D1, D2, D3, N, num_inducing, Q, plot_sim) Y = Ylist[0] k = kern.Linear(Q, ARD=True)# + kern.white(Q, _np.exp(-2)) # + kern.bias(Q) diff --git a/GPy/inference/latent_function_inference/var_dtc.py b/GPy/inference/latent_function_inference/var_dtc.py index 3370fdf1..dfe1c344 100644 --- a/GPy/inference/latent_function_inference/var_dtc.py +++ b/GPy/inference/latent_function_inference/var_dtc.py @@ -302,7 +302,6 @@ class VarDTCMissingData(LatentFunctionInference): #if ((i+1.)/size) >= next_ten: # logger.info('preparing traces {:> 6.1%}'.format((i+1.)/size)) # next_ten += .1 - #y = y[v] if het_noise: beta = beta_all[i] else: beta = beta_all