Skip to content

Commit 3748692

Browse files
bwengalstwiecki
authored andcommitted
typo fixes to cov.py docstrings, added GP class and sample_gp to api docs
1 parent 8949657 commit 3748692

File tree

2 files changed

+28
-15
lines changed

2 files changed

+28
-15
lines changed

docs/source/api/gp.rst

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,18 @@
22
Gaussian Processes
33
******************
44

5+
6+
GP
7+
--
8+
9+
.. currentmodule:: pymc3.gp.gp
10+
.. automodule:: pymc3.gp.gp
11+
:members:
12+
13+
14+
Covariance Functions / Kernels
15+
------------------------------
16+
517
.. currentmodule:: pymc3.gp.cov
618
.. autosummary::
719

pymc3/gp/cov.py

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
class Covariance(object):
1717
R"""
18-
Base class for all covariance functions.
18+
Base class for all kernels/covariance functions.
1919
2020
Parameters
2121
----------
@@ -37,7 +37,7 @@ def __init__(self, input_dim, active_dims=None):
3737

3838
def __call__(self, X, Z):
3939
R"""
40-
Evaluate the covariance function.
40+
Evaluate the kernel/covariance function.
4141
4242
Parameters
4343
----------
@@ -108,7 +108,7 @@ def __call__(self, X, Z=None):
108108

109109
class Stationary(Covariance):
110110
R"""
111-
Base class for stationary covariance functions.
111+
Base class for stationary kernels/covariance functions.
112112
113113
Parameters
114114
----------
@@ -142,8 +142,8 @@ def euclidean_dist(self, X, Z):
142142

143143
class ExpQuad(Stationary):
144144
R"""
145-
The exponentiated quadratic kernel. Also refered to as the squared
146-
exponential, or radial basis function kernel.
145+
The Exponentiated Quadratic kernel. Also refered to as the Squared
146+
Exponential, or Radial Basis Function kernel.
147147
148148
.. math::
149149
@@ -157,7 +157,7 @@ def __call__(self, X, Z=None):
157157

158158
class RatQuad(Stationary):
159159
R"""
160-
The rational quadratic kernel.
160+
The Rational Quadratic kernel.
161161
162162
.. math::
163163
@@ -220,7 +220,7 @@ def __call__(self, X, Z=None):
220220

221221
class Cosine(Stationary):
222222
R"""
223-
The cosine kernel.
223+
The Cosine kernel.
224224
225225
.. math::
226226
k(x, x') = \mathrm{cos}\left( \frac{||x - x'||}{ \ell^2} \right)
@@ -233,7 +233,7 @@ def __call__(self, X, Z=None):
233233

234234
class Linear(Covariance):
235235
R"""
236-
The linear kernel.
236+
The Linear kernel.
237237
238238
.. math::
239239
k(x, x') = (x - c)(x' - c)
@@ -255,7 +255,7 @@ def __call__(self, X, Z=None):
255255

256256
class Polynomial(Linear):
257257
R"""
258-
The polynomial covariance function.
258+
The Polynomial kernel.
259259
260260
.. math::
261261
k(x, x') = [(x - c)(x' - c) + \mathrm{offset}]^{d}
@@ -273,11 +273,11 @@ def __call__(self, X, Z=None):
273273

274274
class WarpedInput(Covariance):
275275
R"""
276-
Warp the inputs of any covariance function using an arbitrary function
276+
Warp the inputs of any kernel using an arbitrary function
277277
defined using Theano.
278278
279279
.. math::
280-
k_{\mathrm{warped}}(x, x') = k(w(x), w(x'))
280+
k(x, x') = k(w(x), w(x'))
281281
282282
Parameters
283283
----------
@@ -308,18 +308,19 @@ def __call__(self, X, Z=None):
308308

309309
class Gibbs(Covariance):
310310
R"""
311-
Use an arbitrary lengthscale function defined using Theano. Operates on a single input dimension.
311+
The Gibbs kernel. Use an arbitrary lengthscale function defined
312+
using Theano. Only tested in one dimension.
312313
313314
.. math::
314-
k_{\mathrm{gibbs}}(x, x') = \sqrt{\frac{2\ell(x)\ell(x')}{\ell^2(x) + \ell^2(x')}}
315-
\mathrm{exp}\left[ -\frac{(x - x')^2}{\ell(x)^2 + \ell^2(x')} \right]
315+
k(x, x') = \sqrt{\frac{2\ell(x)\ell(x')}{\ell^2(x) + \ell^2(x')}}
316+
\mathrm{exp}\left[ -\frac{(x - x')^2}{\ell^2(x) + \ell^2(x')} \right]
316317
317318
Parameters
318319
----------
319320
lengthscale_func : callable
320321
Theano function of X and additional optional arguments.
321322
args : optional, tuple or list of scalars or PyMC3 variables
322-
Additional inputs (besides X or Z) to warp_func.
323+
Additional inputs (besides X or Z) to lengthscale_func.
323324
"""
324325
def __init__(self, input_dim, lengthscale_func, args=None, active_dims=None):
325326
Covariance.__init__(self, input_dim, active_dims)

0 commit comments

Comments
 (0)