Skip to content

Commit

Permalink
Merge pull request #365 from SheffieldML/devel
Browse files Browse the repository at this point in the history
patch 1.0.5
  • Loading branch information
mzwiessele committed Apr 8, 2016
2 parents 07d7c4c + 4ee3799 commit 22b6f11
Show file tree
Hide file tree
Showing 35 changed files with 223 additions and 2,111 deletions.
2 changes: 1 addition & 1 deletion AUTHORS.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
[GPy Authors](https://github.com/SheffieldML/GPy/graphs/contributors)
GPy Authors: https://github.com/SheffieldML/GPy/graphs/contributors
2 changes: 1 addition & 1 deletion GPy/__version__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "1.0.3"
__version__ = "1.0.5"
10 changes: 6 additions & 4 deletions GPy/core/gp.py
Original file line number Diff line number Diff line change
Expand Up @@ -532,21 +532,23 @@ def input_sensitivity(self, summarize=True):
def get_most_significant_input_dimensions(self, which_indices=None):
return self.kern.get_most_significant_input_dimensions(which_indices)

def optimize(self, optimizer=None, start=None, **kwargs):
def optimize(self, optimizer=None, start=None, messages=False, max_iters=1000, ipython_notebook=True, clear_after_finish=False, **kwargs):
"""
Optimize the model using self.log_likelihood and self.log_likelihood_gradient, as well as self.priors.
kwargs are passed to the optimizer. They can be:
:param max_f_eval: maximum number of function evaluations
:type max_f_eval: int
:param max_iters: maximum number of function evaluations
:type max_iters: int
:messages: whether to display during optimisation
:type messages: bool
:param optimizer: which optimizer to use (defaults to self.preferred optimizer), a range of optimisers can be found in :module:`~GPy.inference.optimization`, they include 'scg', 'lbfgs', 'tnc'.
:type optimizer: string
:param bool ipython_notebook: whether to use ipython notebook widgets or not.
:param bool clear_after_finish: if in ipython notebook, we can clear the widgets after optimization.
"""
self.inference_method.on_optimization_start()
try:
super(GP, self).optimize(optimizer, start, **kwargs)
super(GP, self).optimize(optimizer, start, messages, max_iters, ipython_notebook, clear_after_finish, **kwargs)
except KeyboardInterrupt:
print("KeyboardInterrupt caught, calling on_optimization_end() to round things up")
self.inference_method.on_optimization_end()
Expand Down
4 changes: 2 additions & 2 deletions GPy/kern/src/stationary.py
Original file line number Diff line number Diff line change
Expand Up @@ -315,10 +315,10 @@ def __init__(self, input_dim, variance=1., lengthscale=None, ARD=False, active_d
super(Exponential, self).__init__(input_dim, variance, lengthscale, ARD, active_dims, name)

def K_of_r(self, r):
return self.variance * np.exp(-0.5 * r)
return self.variance * np.exp(-r)

def dK_dr(self, r):
return -0.5*self.K_of_r(r)
return -self.K_of_r(r)

# def sde(self):
# """
Expand Down
8 changes: 5 additions & 3 deletions GPy/models/state_space_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -3237,6 +3237,7 @@ def lti_sde_to_descrete(F,L,Qc,dt,compute_derivatives=False,
AB = np.dot(AB, np.vstack((np.zeros((n,n)),np.eye(n))))

Q_noise_1 = linalg.solve(AB[n:,:].T,AB[:n,:].T)
Q_noise_2 = P_inf - A.dot(P_inf).dot(A.T)
# The covariance matrix Q by matrix fraction decomposition <-

if compute_derivatives:
Expand Down Expand Up @@ -3276,8 +3277,9 @@ def lti_sde_to_descrete(F,L,Qc,dt,compute_derivatives=False,
else:
dA = None
dQ = None
Q_noise = Q_noise_1

Q_noise = Q_noise_2
# Innacuracies have been observed when Q_noise_1 was used.

#Q_noise = Q_noise_1

# Return
Expand Down Expand Up @@ -3484,4 +3486,4 @@ def balance_ss_model(F,L,Qc,H,Pinf,P0,dF=None,dQc=None,dPinf=None,dP0=None):

# (F,L,Qc,H,Pinf,P0,dF,dQc,dPinf,dP0)

return bF, bL, bQc, bH, bPinf, bP0, bdF, bdQc, bdPinf, bdP0, T
return bF, bL, bQc, bH, bPinf, bP0, bdF, bdQc, bdPinf, bdP0, T
Binary file modified GPy/testing/baseline/coverage_3d_plot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 22b6f11

Please sign in to comment.