mirror of
https://github.com/SheffieldML/GPy.git
synced 2026-06-11 15:15:15 +02:00
Merge branch 'devel' of github.com:SheffieldML/GPy into devel
This commit is contained in:
commit
6f06646437
10 changed files with 528 additions and 49 deletions
|
|
@ -161,10 +161,13 @@ def bgplvm_oil(optimize=True, verbose=1, plot=True, N=200, Q=7, num_inducing=40,
|
|||
import GPy
|
||||
from matplotlib import pyplot as plt
|
||||
import numpy as np
|
||||
import pods
|
||||
|
||||
_np.random.seed(0)
|
||||
data = pods.datasets.oil()
|
||||
try:
|
||||
import pods
|
||||
data = pods.datasets.oil()
|
||||
except ImportError:
|
||||
data = GPy.util.datasets.oil()
|
||||
|
||||
|
||||
kernel = GPy.kern.RBF(Q, 1., 1./_np.random.uniform(0,1,(Q,)), ARD=True)# + GPy.kern.Bias(Q, _np.exp(-2))
|
||||
Y = data['X'][:N]
|
||||
|
|
|
|||
|
|
@ -34,7 +34,9 @@ class VarDTC(LatentFunctionInference):
|
|||
self.get_YYTfactor.limit = limit
|
||||
|
||||
def _get_trYYT(self, Y):
|
||||
return np.sum(np.square(Y))
|
||||
return np.einsum("ij,ij->", Y, Y)
|
||||
# faster than, but same as:
|
||||
# return np.sum(np.square(Y))
|
||||
|
||||
def __getstate__(self):
|
||||
# has to be overridden, as Cacher objects cannot be pickled.
|
||||
|
|
@ -103,7 +105,7 @@ class VarDTC(LatentFunctionInference):
|
|||
psi0 = kern.Kdiag(X)
|
||||
psi1 = kern.K(X, Z)
|
||||
if het_noise:
|
||||
tmp = psi1 * (np.sqrt(beta.reshape(num_data, 1)))
|
||||
tmp = psi1 * (np.sqrt(beta))
|
||||
else:
|
||||
tmp = psi1 * (np.sqrt(beta))
|
||||
tmp, _ = dtrtrs(Lm, tmp.T, lower=1)
|
||||
|
|
@ -137,14 +139,14 @@ class VarDTC(LatentFunctionInference):
|
|||
|
||||
# log marginal likelihood
|
||||
log_marginal = _compute_log_marginal_likelihood(likelihood, num_data, output_dim, beta, het_noise,
|
||||
psi0, A, LB, trYYT, data_fit, VVT_factor)
|
||||
psi0, A, LB, trYYT, data_fit, Y)
|
||||
|
||||
#noise derivatives
|
||||
dL_dR = _compute_dL_dR(likelihood,
|
||||
het_noise, uncertain_inputs, LB,
|
||||
_LBi_Lmi_psi1Vf, DBi_plus_BiPBi, Lm, A,
|
||||
psi0, psi1, beta,
|
||||
data_fit, num_data, output_dim, trYYT, Y)
|
||||
data_fit, num_data, output_dim, trYYT, Y, VVT_factor)
|
||||
|
||||
dL_dthetaL = likelihood.exact_inference_gradients(dL_dR,Y_metadata)
|
||||
|
||||
|
|
@ -184,14 +186,14 @@ class VarDTC(LatentFunctionInference):
|
|||
return post, log_marginal, grad_dict
|
||||
|
||||
def _compute_dL_dpsi(num_inducing, num_data, output_dim, beta, Lm, VVT_factor, Cpsi1Vf, DBi_plus_BiPBi, psi1, het_noise, uncertain_inputs):
|
||||
dL_dpsi0 = -0.5 * output_dim * (beta[:,None] * np.ones([num_data, 1])).flatten()
|
||||
dL_dpsi0 = -0.5 * output_dim * (beta* np.ones([num_data, 1])).flatten()
|
||||
dL_dpsi1 = np.dot(VVT_factor, Cpsi1Vf.T)
|
||||
dL_dpsi2_beta = 0.5 * backsub_both_sides(Lm, output_dim * np.eye(num_inducing) - DBi_plus_BiPBi)
|
||||
if het_noise:
|
||||
if uncertain_inputs:
|
||||
dL_dpsi2 = beta[:, None, None] * dL_dpsi2_beta[None, :, :]
|
||||
dL_dpsi2 = beta[:, None] * dL_dpsi2_beta[None, :, :]
|
||||
else:
|
||||
dL_dpsi1 += 2.*np.dot(dL_dpsi2_beta, (psi1 * beta.reshape(num_data, 1)).T).T
|
||||
dL_dpsi1 += 2.*np.dot(dL_dpsi2_beta, (psi1 * beta).T).T
|
||||
dL_dpsi2 = None
|
||||
else:
|
||||
dL_dpsi2 = beta * dL_dpsi2_beta
|
||||
|
|
@ -202,7 +204,7 @@ def _compute_dL_dpsi(num_inducing, num_data, output_dim, beta, Lm, VVT_factor, C
|
|||
return dL_dpsi0, dL_dpsi1, dL_dpsi2
|
||||
|
||||
|
||||
def _compute_dL_dR(likelihood, het_noise, uncertain_inputs, LB, _LBi_Lmi_psi1Vf, DBi_plus_BiPBi, Lm, A, psi0, psi1, beta, data_fit, num_data, output_dim, trYYT, Y):
|
||||
def _compute_dL_dR(likelihood, het_noise, uncertain_inputs, LB, _LBi_Lmi_psi1Vf, DBi_plus_BiPBi, Lm, A, psi0, psi1, beta, data_fit, num_data, output_dim, trYYT, Y, VVT_factr=None):
|
||||
# the partial derivative vector for the likelihood
|
||||
if likelihood.size == 0:
|
||||
# save computation here.
|
||||
|
|
@ -217,8 +219,7 @@ def _compute_dL_dR(likelihood, het_noise, uncertain_inputs, LB, _LBi_Lmi_psi1Vf,
|
|||
|
||||
Lmi_psi1, nil = dtrtrs(Lm, psi1.T, lower=1, trans=0)
|
||||
_LBi_Lmi_psi1, _ = dtrtrs(LB, Lmi_psi1, lower=1, trans=0)
|
||||
|
||||
dL_dR = -0.5 * beta + 0.5 * (beta*Y)**2
|
||||
dL_dR = -0.5 * beta + 0.5 * VVT_factr**2
|
||||
dL_dR += 0.5 * output_dim * (psi0 - np.sum(Lmi_psi1**2,0))[:,None] * beta**2
|
||||
|
||||
dL_dR += 0.5*np.sum(mdot(LBi.T,LBi,Lmi_psi1)*Lmi_psi1,0)[:,None]*beta**2
|
||||
|
|
@ -232,10 +233,10 @@ def _compute_dL_dR(likelihood, het_noise, uncertain_inputs, LB, _LBi_Lmi_psi1Vf,
|
|||
dL_dR += beta * (0.5 * np.sum(A * DBi_plus_BiPBi) - data_fit)
|
||||
return dL_dR
|
||||
|
||||
def _compute_log_marginal_likelihood(likelihood, num_data, output_dim, beta, het_noise, psi0, A, LB, trYYT, data_fit,Y):
|
||||
def _compute_log_marginal_likelihood(likelihood, num_data, output_dim, beta, het_noise, psi0, A, LB, trYYT, data_fit, Y):
|
||||
#compute log marginal likelihood
|
||||
if het_noise:
|
||||
lik_1 = -0.5 * num_data * output_dim * np.log(2. * np.pi) + 0.5 * np.sum(np.log(beta)) - 0.5 * np.sum(beta * np.square(Y).sum(axis=-1))
|
||||
lik_1 = -0.5 * num_data * output_dim * np.log(2. * np.pi) + 0.5 * output_dim * np.sum(np.log(beta)) - 0.5 * np.sum(beta.ravel() * np.square(Y).sum(axis=-1))
|
||||
lik_2 = -0.5 * output_dim * (np.sum(beta.flatten() * psi0) - np.trace(A))
|
||||
else:
|
||||
lik_1 = -0.5 * num_data * output_dim * (np.log(2. * np.pi) - np.log(beta)) - 0.5 * beta * trYYT
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ class MixedNoise(Likelihood):
|
|||
variance = np.zeros(ind.size)
|
||||
for lik, j in zip(self.likelihoods_list, range(len(self.likelihoods_list))):
|
||||
variance[ind==j] = lik.variance
|
||||
return variance
|
||||
return variance[:,None]
|
||||
|
||||
def betaY(self,Y,Y_metadata):
|
||||
#TODO not here.
|
||||
|
|
|
|||
|
|
@ -75,7 +75,7 @@ def dparam_checkgrad(func, dfunc, params, params_names, args, constraints=None,
|
|||
if verbose:
|
||||
print grad
|
||||
grad.checkgrad(verbose=1)
|
||||
if not grad.checkgrad():
|
||||
if not grad.checkgrad(verbose=True):
|
||||
gradchecking = False
|
||||
|
||||
return gradchecking
|
||||
|
|
@ -364,9 +364,8 @@ class TestNoiseModels(object):
|
|||
dlogpdf_df = functools.partial(model.dlogpdf_df, y=Y)
|
||||
grad = GradientChecker(logpdf, dlogpdf_df, f.copy(), 'g')
|
||||
grad.randomize()
|
||||
grad.checkgrad(verbose=1)
|
||||
print model
|
||||
assert grad.checkgrad()
|
||||
assert grad.checkgrad(verbose=1)
|
||||
|
||||
@with_setup(setUp, tearDown)
|
||||
def t_d2logpdf_df2(self, model, Y, f):
|
||||
|
|
@ -375,9 +374,8 @@ class TestNoiseModels(object):
|
|||
d2logpdf_df2 = functools.partial(model.d2logpdf_df2, y=Y)
|
||||
grad = GradientChecker(dlogpdf_df, d2logpdf_df2, f.copy(), 'g')
|
||||
grad.randomize()
|
||||
grad.checkgrad(verbose=1)
|
||||
print model
|
||||
assert grad.checkgrad()
|
||||
assert grad.checkgrad(verbose=1)
|
||||
|
||||
@with_setup(setUp, tearDown)
|
||||
def t_d3logpdf_df3(self, model, Y, f):
|
||||
|
|
@ -386,9 +384,8 @@ class TestNoiseModels(object):
|
|||
d3logpdf_df3 = functools.partial(model.d3logpdf_df3, y=Y)
|
||||
grad = GradientChecker(d2logpdf_df2, d3logpdf_df3, f.copy(), 'g')
|
||||
grad.randomize()
|
||||
grad.checkgrad(verbose=1)
|
||||
print model
|
||||
assert grad.checkgrad()
|
||||
assert grad.checkgrad(verbose=1)
|
||||
|
||||
##############
|
||||
# df_dparams #
|
||||
|
|
@ -439,8 +436,8 @@ class TestNoiseModels(object):
|
|||
|
||||
grad.randomize()
|
||||
print grad
|
||||
grad.checkgrad(verbose=1)
|
||||
assert grad.checkgrad()
|
||||
print model
|
||||
assert grad.checkgrad(verbose=1)
|
||||
|
||||
@with_setup(setUp, tearDown)
|
||||
def t_d2logpdf_dlink2(self, model, Y, f, link_f_constraints):
|
||||
|
|
@ -454,9 +451,9 @@ class TestNoiseModels(object):
|
|||
constraint('g', grad)
|
||||
|
||||
grad.randomize()
|
||||
grad.checkgrad(verbose=1)
|
||||
print grad
|
||||
assert grad.checkgrad()
|
||||
print model
|
||||
assert grad.checkgrad(verbose=1)
|
||||
|
||||
@with_setup(setUp, tearDown)
|
||||
def t_d3logpdf_dlink3(self, model, Y, f, link_f_constraints):
|
||||
|
|
@ -470,9 +467,9 @@ class TestNoiseModels(object):
|
|||
constraint('g', grad)
|
||||
|
||||
grad.randomize()
|
||||
grad.checkgrad(verbose=1)
|
||||
print grad
|
||||
assert grad.checkgrad()
|
||||
print model
|
||||
assert grad.checkgrad(verbose=1)
|
||||
|
||||
#################
|
||||
# dlink_dparams #
|
||||
|
|
@ -535,13 +532,12 @@ class TestNoiseModels(object):
|
|||
|
||||
#m.optimize(max_iters=8)
|
||||
print m
|
||||
m.checkgrad(verbose=1, step=step)
|
||||
#if not m.checkgrad(step=step):
|
||||
#m.checkgrad(verbose=1, step=step)
|
||||
#NOTE this test appears to be stochastic for some likelihoods (student t?)
|
||||
# appears to all be working in test mode right now...
|
||||
#if isinstance(model, GPy.likelihoods.StudentT):
|
||||
assert m.checkgrad(step=step)
|
||||
assert m.checkgrad(verbose=1, step=step)
|
||||
|
||||
###########
|
||||
# EP test #
|
||||
|
|
@ -563,9 +559,8 @@ class TestNoiseModels(object):
|
|||
constraints[param_num](name, m)
|
||||
|
||||
m.randomize()
|
||||
m.checkgrad(verbose=1, step=step)
|
||||
print m
|
||||
assert m.checkgrad(step=step)
|
||||
assert m.checkgrad(verbose=1, step=step)
|
||||
|
||||
|
||||
class LaplaceTests(unittest.TestCase):
|
||||
|
|
@ -616,8 +611,8 @@ class LaplaceTests(unittest.TestCase):
|
|||
d2logpdf_df2 = functools.partial(self.gauss.d2logpdf_df2, y=self.Y)
|
||||
grad = GradientChecker(dlogpdf_df, d2logpdf_df2, self.f.copy(), 'g')
|
||||
grad.randomize()
|
||||
grad.checkgrad(verbose=1)
|
||||
self.assertTrue(grad.checkgrad())
|
||||
|
||||
self.assertTrue(grad.checkgrad(verbose=1))
|
||||
|
||||
def test_laplace_log_likelihood(self):
|
||||
debug = False
|
||||
|
|
@ -705,8 +700,8 @@ class LaplaceTests(unittest.TestCase):
|
|||
#Check they are checkgradding
|
||||
#m1.checkgrad(verbose=1)
|
||||
#m2.checkgrad(verbose=1)
|
||||
self.assertTrue(m1.checkgrad())
|
||||
self.assertTrue(m2.checkgrad())
|
||||
self.assertTrue(m1.checkgrad(verbose=True))
|
||||
self.assertTrue(m2.checkgrad(verbose=True))
|
||||
|
||||
if __name__ == "__main__":
|
||||
print "Running unit tests"
|
||||
|
|
|
|||
62
doc/GPy.kern._src.psi_comp.rst
Normal file
62
doc/GPy.kern._src.psi_comp.rst
Normal file
|
|
@ -0,0 +1,62 @@
|
|||
GPy.kern._src.psi_comp package
|
||||
==============================
|
||||
|
||||
Submodules
|
||||
----------
|
||||
|
||||
GPy.kern._src.psi_comp.linear_psi_comp module
|
||||
---------------------------------------------
|
||||
|
||||
.. automodule:: GPy.kern._src.psi_comp.linear_psi_comp
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
|
||||
GPy.kern._src.psi_comp.rbf_psi_comp module
|
||||
------------------------------------------
|
||||
|
||||
.. automodule:: GPy.kern._src.psi_comp.rbf_psi_comp
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
|
||||
GPy.kern._src.psi_comp.rbf_psi_gpucomp module
|
||||
---------------------------------------------
|
||||
|
||||
.. automodule:: GPy.kern._src.psi_comp.rbf_psi_gpucomp
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
|
||||
GPy.kern._src.psi_comp.sslinear_psi_comp module
|
||||
-----------------------------------------------
|
||||
|
||||
.. automodule:: GPy.kern._src.psi_comp.sslinear_psi_comp
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
|
||||
GPy.kern._src.psi_comp.ssrbf_psi_comp module
|
||||
--------------------------------------------
|
||||
|
||||
.. automodule:: GPy.kern._src.psi_comp.ssrbf_psi_comp
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
|
||||
GPy.kern._src.psi_comp.ssrbf_psi_gpucomp module
|
||||
-----------------------------------------------
|
||||
|
||||
.. automodule:: GPy.kern._src.psi_comp.ssrbf_psi_gpucomp
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
|
||||
|
||||
Module contents
|
||||
---------------
|
||||
|
||||
.. automodule:: GPy.kern._src.psi_comp
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
197
doc/GPy.kern._src.rst
Normal file
197
doc/GPy.kern._src.rst
Normal file
|
|
@ -0,0 +1,197 @@
|
|||
GPy.kern._src package
|
||||
=====================
|
||||
|
||||
Subpackages
|
||||
-----------
|
||||
|
||||
.. toctree::
|
||||
|
||||
GPy.kern._src.psi_comp
|
||||
|
||||
Submodules
|
||||
----------
|
||||
|
||||
GPy.kern._src.ODE_UY module
|
||||
---------------------------
|
||||
|
||||
.. automodule:: GPy.kern._src.ODE_UY
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
|
||||
GPy.kern._src.ODE_UYC module
|
||||
----------------------------
|
||||
|
||||
.. automodule:: GPy.kern._src.ODE_UYC
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
|
||||
GPy.kern._src.ODE_st module
|
||||
---------------------------
|
||||
|
||||
.. automodule:: GPy.kern._src.ODE_st
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
|
||||
GPy.kern._src.ODE_t module
|
||||
--------------------------
|
||||
|
||||
.. automodule:: GPy.kern._src.ODE_t
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
|
||||
GPy.kern._src.add module
|
||||
------------------------
|
||||
|
||||
.. automodule:: GPy.kern._src.add
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
|
||||
GPy.kern._src.brownian module
|
||||
-----------------------------
|
||||
|
||||
.. automodule:: GPy.kern._src.brownian
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
|
||||
GPy.kern._src.coregionalize module
|
||||
----------------------------------
|
||||
|
||||
.. automodule:: GPy.kern._src.coregionalize
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
|
||||
GPy.kern._src.hierarchical module
|
||||
---------------------------------
|
||||
|
||||
.. automodule:: GPy.kern._src.hierarchical
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
|
||||
GPy.kern._src.independent_outputs module
|
||||
----------------------------------------
|
||||
|
||||
.. automodule:: GPy.kern._src.independent_outputs
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
|
||||
GPy.kern._src.kern module
|
||||
-------------------------
|
||||
|
||||
.. automodule:: GPy.kern._src.kern
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
|
||||
GPy.kern._src.kernel_slice_operations module
|
||||
--------------------------------------------
|
||||
|
||||
.. automodule:: GPy.kern._src.kernel_slice_operations
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
|
||||
GPy.kern._src.linear module
|
||||
---------------------------
|
||||
|
||||
.. automodule:: GPy.kern._src.linear
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
|
||||
GPy.kern._src.mlp module
|
||||
------------------------
|
||||
|
||||
.. automodule:: GPy.kern._src.mlp
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
|
||||
GPy.kern._src.periodic module
|
||||
-----------------------------
|
||||
|
||||
.. automodule:: GPy.kern._src.periodic
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
|
||||
GPy.kern._src.poly module
|
||||
-------------------------
|
||||
|
||||
.. automodule:: GPy.kern._src.poly
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
|
||||
GPy.kern._src.prod module
|
||||
-------------------------
|
||||
|
||||
.. automodule:: GPy.kern._src.prod
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
|
||||
GPy.kern._src.rbf module
|
||||
------------------------
|
||||
|
||||
.. automodule:: GPy.kern._src.rbf
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
|
||||
GPy.kern._src.splitKern module
|
||||
------------------------------
|
||||
|
||||
.. automodule:: GPy.kern._src.splitKern
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
|
||||
GPy.kern._src.static module
|
||||
---------------------------
|
||||
|
||||
.. automodule:: GPy.kern._src.static
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
|
||||
GPy.kern._src.stationary module
|
||||
-------------------------------
|
||||
|
||||
.. automodule:: GPy.kern._src.stationary
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
|
||||
GPy.kern._src.symbolic module
|
||||
-----------------------------
|
||||
|
||||
.. automodule:: GPy.kern._src.symbolic
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
|
||||
GPy.kern._src.trunclinear module
|
||||
--------------------------------
|
||||
|
||||
.. automodule:: GPy.kern._src.trunclinear
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
|
||||
|
||||
Module contents
|
||||
---------------
|
||||
|
||||
.. automodule:: GPy.kern._src
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
|
|
@ -1,6 +1,13 @@
|
|||
GPy.kern package
|
||||
================
|
||||
|
||||
Subpackages
|
||||
-----------
|
||||
|
||||
.. toctree::
|
||||
|
||||
GPy.kern._src
|
||||
|
||||
Module contents
|
||||
---------------
|
||||
|
||||
|
|
|
|||
|
|
@ -60,14 +60,6 @@ GPy.likelihoods.mixed_noise module
|
|||
:undoc-members:
|
||||
:show-inheritance:
|
||||
|
||||
GPy.likelihoods.ordinal module
|
||||
------------------------------
|
||||
|
||||
.. automodule:: GPy.likelihoods.ordinal
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
|
||||
GPy.likelihoods.poisson module
|
||||
------------------------------
|
||||
|
||||
|
|
|
|||
30
doc/conf.py
30
doc/conf.py
|
|
@ -11,8 +11,29 @@
|
|||
# All configuration values have a default; values that are commented out
|
||||
# serve to show the default.
|
||||
|
||||
autodoc_default_flags = ['members', 'show-inheritance', 'private-members', 'special-members']
|
||||
autodoc_member_order = "source"
|
||||
#autodoc_default_flags = ['members', 'show-inheritance', 'private-members', 'special-members']
|
||||
#autodoc_default_flags = ['private-members', 'special-members']
|
||||
#autodoc_default_flags = 'private-members'
|
||||
#autodoc_member_order = "source"
|
||||
|
||||
#def autodoc_skip_member(app, what, name, obj, skip, options):
|
||||
#exclusions = ('__weakref__', # special-members
|
||||
#'__doc__', '__module__', '__dict__', # undoc-members
|
||||
#)
|
||||
#exclude = name in exclusions
|
||||
|
||||
#inclusions = ('_src')
|
||||
#include = name in inclusions
|
||||
#if include:
|
||||
#print app, what, name, obj, skip, options
|
||||
#return False
|
||||
#return skip or exclude
|
||||
|
||||
#def setup(app):
|
||||
##app.connect('autodoc-process-docstring', cut_lines(2))
|
||||
##app.connect('autodoc_default_flags', autodoc_default_flags)
|
||||
##app.connect('autodoc_member_order', autodoc_member_order)
|
||||
#app.connect('autodoc-skip-member', autodoc_skip_member)
|
||||
|
||||
import sys
|
||||
import os
|
||||
|
|
@ -114,6 +135,7 @@ MOCK_MODULES = ['sympy',
|
|||
for mod_name in MOCK_MODULES:
|
||||
sys.modules[mod_name] = Mock()
|
||||
|
||||
|
||||
# ----------------------- READTHEDOCS ------------------
|
||||
on_rtd = os.environ.get('READTHEDOCS', None) == 'True'
|
||||
|
||||
|
|
@ -129,8 +151,8 @@ if on_rtd:
|
|||
proc = subprocess.Popen("ls ../", stdout=subprocess.PIPE, shell=True)
|
||||
(out, err) = proc.communicate()
|
||||
print "program output:", out
|
||||
#proc = subprocess.Popen("sphinx-apidoc -f -o . ../GPy", stdout=subprocess.PIPE, shell=True)
|
||||
proc = subprocess.Popen("make html", stdout=subprocess.PIPE, shell=True)
|
||||
#Lets regenerate our rst files from the source, -P adds private modules (i.e kern._src)
|
||||
proc = subprocess.Popen("sphinx-apidoc -P -f -o . ../GPy", stdout=subprocess.PIPE, shell=True)
|
||||
(out, err) = proc.communicate()
|
||||
print "program output:", out
|
||||
#proc = subprocess.Popen("whereis numpy", stdout=subprocess.PIPE, shell=True)
|
||||
|
|
|
|||
200
doc/log.txt
Normal file
200
doc/log.txt
Normal file
|
|
@ -0,0 +1,200 @@
|
|||
/home/alans/Work/GPy/GPy/__init__.py:docstring of GPy.load:1: WARNING: Inline interpreted text or phrase reference start-string without end-string.
|
||||
/home/alans/Work/GPy/GPy/core/gp.py:docstring of GPy.core.gp.GP:7: WARNING: Field list ends without a blank line; unexpected unindent.
|
||||
/home/alans/Work/GPy/GPy/core/gp.py:docstring of GPy.core.gp.GP:10: ERROR: Unexpected indentation.
|
||||
/home/alans/Work/GPy/GPy/core/gp.py:docstring of GPy.core.gp.GP.predictive_gradients:5: ERROR: Unexpected indentation.
|
||||
/home/alans/Work/GPy/GPy/core/model.py:docstring of GPy.core.model.Model.optimize_restarts:29: WARNING: Explicit markup ends without a blank line; unexpected unindent.
|
||||
/home/alans/Work/GPy/doc/GPy.core.rst:65: WARNING: autodoc: failed to import module u'GPy.core.symbolic'; the following exception was raised:
|
||||
Traceback (most recent call last):
|
||||
File "/home/alans/anaconda/envs/GPy/lib/python2.7/site-packages/sphinx/ext/autodoc.py", line 335, in import_object
|
||||
__import__(self.modname)
|
||||
File "/home/alans/Work/GPy/GPy/core/symbolic.py", line 10, in <module>
|
||||
from sympy.utilities.lambdify import lambdastr, _imp_namespace, _get_namespace
|
||||
ImportError: No module named lambdify
|
||||
/home/alans/Work/GPy/GPy/core/parameterization/parameter_core.py:docstring of GPy.core.parameterization.parameter_core.Indexable.unset_priors:1: WARNING: Inline emphasis start-string without end-string.
|
||||
/home/alans/Work/GPy/GPy/core/parameterization/parameter_core.py:docstring of GPy.core.parameterization.parameter_core.Nameable.hierarchy_name:4: WARNING: Field list ends without a blank line; unexpected unindent.
|
||||
/home/alans/Work/GPy/GPy/core/parameterization/parameter_core.py:docstring of GPy.core.parameterization.parameter_core.Observable.notify_observers:5: SEVERE: Unexpected section title or transition.
|
||||
|
||||
^^^^^^^^^^^^^^^^
|
||||
/home/alans/Work/GPy/GPy/core/parameterization/parameter_core.py:docstring of GPy.core.parameterization.parameter_core.Observable.notify_observers:6: WARNING: Definition list ends without a blank line; unexpected unindent.
|
||||
/home/alans/Work/GPy/GPy/core/parameterization/parameter_core.py:docstring of GPy.core.parameterization.parameter_core.Parameterizable.traverse:1: WARNING: Inline emphasis start-string without end-string.
|
||||
/home/alans/Work/GPy/GPy/core/parameterization/parameter_core.py:docstring of GPy.core.parameterization.parameter_core.Parameterizable.traverse:1: WARNING: Inline strong start-string without end-string.
|
||||
/home/alans/Work/GPy/GPy/core/parameterization/parameterized.py:docstring of GPy.core.parameterization.parameterized.Parameterized:18: ERROR: Unexpected indentation.
|
||||
/home/alans/Work/GPy/GPy/core/parameterization/parameterized.py:docstring of GPy.core.parameterization.parameterized.Parameterized:20: WARNING: Block quote ends without a blank line; unexpected unindent.
|
||||
/home/alans/Work/GPy/GPy/core/parameterization/ties_and_remappings.py:docstring of GPy.core.parameterization.ties_and_remappings.Tie:18: SEVERE: Unexpected section title or transition.
|
||||
|
||||
================================
|
||||
/home/alans/Work/GPy/doc/GPy.examples.rst:18: WARNING: autodoc: failed to import module u'GPy.examples.coreg_example'; the following exception was raised:
|
||||
Traceback (most recent call last):
|
||||
File "/home/alans/anaconda/envs/GPy/lib/python2.7/site-packages/sphinx/ext/autodoc.py", line 335, in import_object
|
||||
__import__(self.modname)
|
||||
File "/home/alans/Work/GPy/GPy/examples/coreg_example.py", line 44, in <module>
|
||||
m = GPy.models.SparseGPCoregionalizedRegression(X_list=[X1], Y_list=[Y1], Z_list = [Z1], kernel=kern)
|
||||
File "/home/alans/Work/GPy/GPy/core/parameterization/parameterized.py", line 19, in __call__
|
||||
self = super(ParametersChangedMeta, self).__call__(*args, **kw)
|
||||
File "/home/alans/Work/GPy/GPy/models/sparse_gp_coregionalized_regression.py", line 66, in __init__
|
||||
self['.*inducing'][:,-1].fix()
|
||||
File "/home/alans/Work/GPy/GPy/core/parameterization/parameter_core.py", line 444, in constrain_fixed
|
||||
self.notify_observers(self, None if trigger_parent else -np.inf)
|
||||
File "/home/alans/Work/GPy/GPy/core/parameterization/parameter_core.py", line 148, in notify_observers
|
||||
[callble(self, which=which) for _, _, callble in self.observers]
|
||||
File "/home/alans/Work/GPy/GPy/core/parameterization/parameter_core.py", line 1077, in _pass_through_notify_observers
|
||||
self.notify_observers(which=which)
|
||||
File "/home/alans/Work/GPy/GPy/core/parameterization/parameter_core.py", line 148, in notify_observers
|
||||
[callble(self, which=which) for _, _, callble in self.observers]
|
||||
File "/home/alans/Work/GPy/GPy/core/parameterization/parameter_core.py", line 1075, in _parameters_changed_notification
|
||||
self.parameters_changed()
|
||||
File "/home/alans/Work/GPy/GPy/core/sparse_gp.py", line 66, in parameters_changed
|
||||
self.posterior, self._log_marginal_likelihood, self.grad_dict = self.inference_method.inference(self.kern, self.X, self.Z, self.likelihood, self.Y, self.Y_metadata)
|
||||
File "/home/alans/Work/GPy/GPy/inference/latent_function_inference/var_dtc.py", line 170, in inference
|
||||
import ipdb; ipdb.set_trace()
|
||||
ImportError: No module named ipdb
|
||||
/home/alans/Work/GPy/GPy/kern/_src/coregionalize.py:docstring of GPy.kern._src.coregionalize.Coregionalize:5: ERROR: Unexpected indentation.
|
||||
/home/alans/Work/GPy/doc/GPy.kern._src.rst:73: WARNING: autodoc: failed to import module u'GPy.kern._src.hierarchical'; the following exception was raised:
|
||||
Traceback (most recent call last):
|
||||
File "/home/alans/anaconda/envs/GPy/lib/python2.7/site-packages/sphinx/ext/autodoc.py", line 335, in import_object
|
||||
__import__(self.modname)
|
||||
File "/home/alans/Work/GPy/GPy/kern/_src/hierarchical.py", line 4, in <module>
|
||||
from kernpart import Kernpart
|
||||
ImportError: No module named kernpart
|
||||
/home/alans/Work/GPy/GPy/kern/_src/independent_outputs.py:docstring of GPy.kern._src.independent_outputs.IndependentOutputs:9: WARNING: Field list ends without a blank line; unexpected unindent.
|
||||
/home/alans/Work/GPy/GPy/kern/_src/stationary.py:docstring of GPy.kern._src.stationary.Stationary:12: WARNING: Block quote ends without a blank line; unexpected unindent.
|
||||
/home/alans/Work/GPy/GPy/kern/_src/stationary.py:docstring of GPy.kern._src.stationary.Stationary:22: ERROR: Unexpected indentation.
|
||||
/home/alans/Work/GPy/GPy/kern/_src/stationary.py:docstring of GPy.kern._src.stationary.Stationary:23: WARNING: Block quote ends without a blank line; unexpected unindent.
|
||||
/home/alans/Work/GPy/doc/GPy.kern._src.rst:177: WARNING: autodoc: failed to import module u'GPy.kern._src.symbolic'; the following exception was raised:
|
||||
Traceback (most recent call last):
|
||||
File "/home/alans/anaconda/envs/GPy/lib/python2.7/site-packages/sphinx/ext/autodoc.py", line 335, in import_object
|
||||
__import__(self.modname)
|
||||
File "/home/alans/Work/GPy/GPy/kern/_src/symbolic.py", line 5, in <module>
|
||||
from ...core.symbolic import Symbolic_core
|
||||
File "/home/alans/Work/GPy/GPy/core/symbolic.py", line 10, in <module>
|
||||
from sympy.utilities.lambdify import lambdastr, _imp_namespace, _get_namespace
|
||||
ImportError: No module named lambdify
|
||||
/home/alans/Work/GPy/GPy/models/gp_kronecker_gaussian_regression.py:docstring of GPy.models.gp_kronecker_gaussian_regression.GPKroneckerGaussianRegression:13: ERROR: Unexpected indentation.
|
||||
/home/alans/Work/GPy/GPy/models/gp_kronecker_gaussian_regression.py:docstring of GPy.models.gp_kronecker_gaussian_regression.GPKroneckerGaussianRegression:18: WARNING: Block quote ends without a blank line; unexpected unindent.
|
||||
/home/alans/Work/GPy/GPy/models/gp_var_gauss.py:docstring of GPy.models.gp_var_gauss.GPVariationalGaussianApproximation:9: WARNING: Definition list ends without a blank line; unexpected unindent.
|
||||
/home/alans/Work/GPy/GPy/models/mrd.py:docstring of GPy.models.mrd.MRD:32: WARNING: Field list ends without a blank line; unexpected unindent.
|
||||
/home/alans/Work/GPy/GPy/models/mrd.py:docstring of GPy.models.mrd.MRD:32: WARNING: Inline interpreted text or phrase reference start-string without end-string.
|
||||
/home/alans/Work/GPy/GPy/models/mrd.py:docstring of GPy.models.mrd.MRD:34: WARNING: Definition list ends without a blank line; unexpected unindent.
|
||||
/home/alans/Work/GPy/GPy/models/sparse_gp_minibatch.py:docstring of GPy.models.sparse_gp_minibatch.SparseGPMiniBatch:2: WARNING: Block quote ends without a blank line; unexpected unindent.
|
||||
/home/alans/Work/GPy/GPy/plotting/matplot_dep/netpbmfile.py:docstring of GPy.plotting.matplot_dep.netpbmfile.imread:6: SEVERE: Unexpected section title.
|
||||
|
||||
Examples
|
||||
--------
|
||||
/home/alans/Work/GPy/GPy/plotting/matplot_dep/netpbmfile.py:docstring of GPy.plotting.matplot_dep.netpbmfile.imsave:4: SEVERE: Unexpected section title.
|
||||
|
||||
Examples
|
||||
--------
|
||||
/home/alans/Work/GPy/GPy/testing/likelihood_tests.py:docstring of GPy.testing.likelihood_tests.dparam_checkgrad:6: ERROR: Unexpected indentation.
|
||||
/home/alans/Work/GPy/GPy/testing/likelihood_tests.py:docstring of GPy.testing.likelihood_tests.dparam_checkgrad:7: WARNING: Block quote ends without a blank line; unexpected unindent.
|
||||
/home/alans/Work/GPy/GPy/testing/likelihood_tests.py:docstring of GPy.testing.likelihood_tests.dparam_partial:7: WARNING: Definition list ends without a blank line; unexpected unindent.
|
||||
/home/alans/Work/GPy/GPy/testing/likelihood_tests.py:docstring of GPy.testing.likelihood_tests.dparam_partial:9: ERROR: Unexpected indentation.
|
||||
/home/alans/Work/GPy/GPy/util/datasets.py:docstring of GPy.util.datasets.hapmap3:7: WARNING: Block quote ends without a blank line; unexpected unindent.
|
||||
/home/alans/Work/GPy/doc/GPy.util.rst:2: SEVERE: Duplicate ID: "module-GPy.util.diag".
|
||||
/home/alans/Work/GPy/GPy/util/netpbmfile.py:docstring of GPy.util.netpbmfile.imread:6: SEVERE: Unexpected section title.
|
||||
|
||||
Examples
|
||||
--------
|
||||
/home/alans/Work/GPy/GPy/util/netpbmfile.py:docstring of GPy.util.netpbmfile.imsave:4: SEVERE: Unexpected section title.
|
||||
|
||||
Examples
|
||||
--------
|
||||
/home/alans/Work/GPy/doc/GPy.util.rst:2: SEVERE: Duplicate ID: "module-GPy.util.subarray_and_sorting".
|
||||
/home/alans/Work/GPy/GPy/util/subarray_and_sorting.py:docstring of GPy.util.subarray_and_sorting.common_subarrays:8: ERROR: Unexpected indentation.
|
||||
/home/alans/Work/GPy/GPy/util/subarray_and_sorting.py:docstring of GPy.util.subarray_and_sorting.common_subarrays:11: SEVERE: Unexpected section title.
|
||||
|
||||
Examples:
|
||||
=========
|
||||
/home/alans/Work/GPy/GPy/util/subarray_and_sorting.py:docstring of GPy.util.subarray_and_sorting.common_subarrays:19: ERROR: Unexpected indentation.
|
||||
/home/alans/Work/GPy/GPy/util/subarray_and_sorting.py:docstring of GPy.util.subarray_and_sorting.common_subarrays:21: WARNING: Block quote ends without a blank line; unexpected unindent.
|
||||
/home/alans/Work/GPy/doc/installation.rst:22: ERROR: Unexpected indentation.
|
||||
/home/alans/Work/GPy/doc/installation.rst:27: ERROR: Unexpected indentation.
|
||||
/home/alans/Work/GPy/doc/tuto_creating_new_kernels.rst:58: WARNING: Inline literal start-string without end-string.
|
||||
/home/alans/Work/GPy/doc/tuto_creating_new_models.rst:24: ERROR: Unknown target name: "parameterized".
|
||||
/home/alans/Work/GPy/doc/tuto_interacting_with_models.rst:83: WARNING: Title underline too short.
|
||||
|
||||
Interacting with Parameters:
|
||||
=======================
|
||||
/home/alans/Work/GPy/doc/tuto_interacting_with_models.rst:83: WARNING: Title underline too short.
|
||||
|
||||
Interacting with Parameters:
|
||||
=======================
|
||||
/home/alans/Work/GPy/doc/tuto_interacting_with_models.rst:109: WARNING: Title underline too short.
|
||||
|
||||
Regular expressions
|
||||
----------------
|
||||
/home/alans/Work/GPy/doc/tuto_interacting_with_models.rst:164: WARNING: Title underline too short.
|
||||
|
||||
Setting and fetching parameters `parameter_array`
|
||||
------------------------------------------
|
||||
/home/alans/Work/GPy/doc/tuto_interacting_with_models.rst:164: WARNING: Title underline too short.
|
||||
|
||||
Setting and fetching parameters `parameter_array`
|
||||
------------------------------------------
|
||||
/home/alans/Work/GPy/doc/tuto_interacting_with_models.rst:220: WARNING: Title underline too short.
|
||||
|
||||
Getting the model parameter's gradients
|
||||
============================
|
||||
/home/alans/Work/GPy/doc/tuto_interacting_with_models.rst:220: WARNING: Title underline too short.
|
||||
|
||||
Getting the model parameter's gradients
|
||||
============================
|
||||
/home/alans/Work/GPy/doc/tuto_interacting_with_models.rst:236: WARNING: Title underline too short.
|
||||
|
||||
Adjusting the model's constraints
|
||||
================================
|
||||
/home/alans/Work/GPy/doc/tuto_interacting_with_models.rst:236: WARNING: Title underline too short.
|
||||
|
||||
Adjusting the model's constraints
|
||||
================================
|
||||
/home/alans/Work/GPy/doc/tuto_interacting_with_models.rst:287: WARNING: Title underline too short.
|
||||
|
||||
Available Constraints
|
||||
==============
|
||||
/home/alans/Work/GPy/doc/tuto_interacting_with_models.rst:287: WARNING: Title underline too short.
|
||||
|
||||
Available Constraints
|
||||
==============
|
||||
/home/alans/Work/GPy/doc/tuto_interacting_with_models.rst:299: WARNING: Title underline too short.
|
||||
|
||||
Tying Parameters
|
||||
============
|
||||
/home/alans/Work/GPy/doc/tuto_interacting_with_models.rst:299: WARNING: Title underline too short.
|
||||
|
||||
Tying Parameters
|
||||
============
|
||||
/home/alans/Work/GPy/doc/tuto_parameterized.rst:3: WARNING: Title overline too short.
|
||||
|
||||
*******************
|
||||
Parameterization handling
|
||||
*******************
|
||||
/home/alans/Work/GPy/doc/tuto_parameterized.rst:10: WARNING: Title underline too short.
|
||||
|
||||
Parameter handles
|
||||
==============
|
||||
/home/alans/Work/GPy/doc/tuto_parameterized.rst:16: WARNING: Title underline too short.
|
||||
|
||||
:py:class:`~GPy.core.parameterization.parameterized.Parameterized`
|
||||
==========
|
||||
/home/alans/Work/GPy/doc/tuto_parameterized.rst:16: WARNING: Title underline too short.
|
||||
|
||||
:py:class:`~GPy.core.parameterization.parameterized.Parameterized`
|
||||
==========
|
||||
/home/alans/Work/GPy/doc/tuto_parameterized.rst:21: WARNING: Title underline too short.
|
||||
|
||||
:py:class:`~GPy.core.parameterization.param.Param`
|
||||
===========
|
||||
/home/alans/Work/GPy/doc/tuto_parameterized.rst:21: WARNING: Title underline too short.
|
||||
|
||||
:py:class:`~GPy.core.parameterization.param.Param`
|
||||
===========
|
||||
/home/alans/Work/GPy/doc/kernel_implementation.rst:: WARNING: document isn't included in any toctree
|
||||
/home/alans/Work/GPy/doc/modules.rst:: WARNING: document isn't included in any toctree
|
||||
/home/alans/Work/GPy/doc/tuto_GP_regression.rst:: WARNING: document isn't included in any toctree
|
||||
/home/alans/Work/GPy/doc/tuto_creating_new_kernels.rst:: WARNING: document isn't included in any toctree
|
||||
/home/alans/Work/GPy/doc/tuto_creating_new_models.rst:: WARNING: document isn't included in any toctree
|
||||
/home/alans/Work/GPy/doc/tuto_interacting_with_models.rst:: WARNING: document isn't included in any toctree
|
||||
/home/alans/Work/GPy/doc/tuto_kernel_overview.rst:: WARNING: document isn't included in any toctree
|
||||
/home/alans/Work/GPy/doc/tuto_parameterized.rst:: WARNING: document isn't included in any toctree
|
||||
WARNING: dvipng command 'dvipng' cannot be run (needed for math display), check the pngmath_dvipng setting
|
||||
/home/alans/Work/GPy/doc/tuto_interacting_with_models.rst:336: WARNING: undefined label: creating_new_kernels (if the link has no caption the label must precede a section header)
|
||||
WARNING: html_static_path entry u'/home/alans/Work/GPy/doc/_static' does not exist
|
||||
Loading…
Add table
Add a link
Reference in a new issue