mirror of
https://github.com/SheffieldML/GPy.git
synced 2026-05-05 01:32:40 +02:00
fixed bug in sparse GP plotting
This commit is contained in:
parent
b59253fe01
commit
17a82f99bd
3 changed files with 2 additions and 33 deletions
|
|
@ -257,37 +257,6 @@ class opt_SGD(Optimizer):
|
|||
self.learning_rate = np.ones_like(self.learning_rate)*(np.dot(self.gbar_t.T, self.gbar_t) / self.hbar_t)
|
||||
tau_t = self.tau_t*(1-self.learning_rate) + 1
|
||||
|
||||
# if t == 0:
|
||||
# N = self.model.N
|
||||
# Q = self.model.Q
|
||||
# M = self.model.M
|
||||
|
||||
# iip_pos = np.arange(2*N*Q,2*N*Q+M*Q)
|
||||
# mu_pos = np.arange(0,N*Q)
|
||||
# S_pos = np.arange(N*Q,2*N*Q)
|
||||
# self.vbparam_dict = {'iip': [iip_pos],
|
||||
# 'mu': [mu_pos],
|
||||
# 'S': [S_pos]}
|
||||
|
||||
# for k in self.vbparam_dict.keys():
|
||||
# hbar_t = 0.0
|
||||
# tau_t = 1.0
|
||||
# gbar_t = 0.0
|
||||
# self.vbparam_dict[k].append(hbar_t)
|
||||
# self.vbparam_dict[k].append(tau_t)
|
||||
# self.vbparam_dict[k].append(gbar_t)
|
||||
# if True:
|
||||
# g_t = self.model.grads
|
||||
|
||||
# for k in self.vbparam_dict.keys():
|
||||
# pos, hbar_t, tau_t, gbar_t = self.vbparam_dict[k]
|
||||
# gbar_t = (1-1/tau_t)*gbar_t + 1/tau_t * g_t[pos]
|
||||
# hbar_t = (1-1/tau_t)*hbar_t + 1/tau_t * np.dot(g_t[pos].T, g_t[pos])
|
||||
# self.learning_rate[pos] = (np.dot(gbar_t.T, gbar_t) / hbar_t)*1.0
|
||||
# tau_t = tau_t*(1-self.learning_rate[pos]) + 1
|
||||
# self.vbparam_dict[k] = [pos, hbar_t, tau_t, gbar_t]
|
||||
# print k, self.learning_rate[pos].max()
|
||||
|
||||
|
||||
def opt(self, f_fp=None, f=None, fp=None):
|
||||
self.x_opt = self.model._get_params_transformed()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue