15
15
16
16
class Covariance (object ):
17
17
R"""
18
- Base class for all covariance functions.
18
+ Base class for all kernels/ covariance functions.
19
19
20
20
Parameters
21
21
----------
@@ -37,7 +37,7 @@ def __init__(self, input_dim, active_dims=None):
37
37
38
38
def __call__ (self , X , Z ):
39
39
R"""
40
- Evaluate the covariance function.
40
+ Evaluate the kernel/ covariance function.
41
41
42
42
Parameters
43
43
----------
@@ -108,7 +108,7 @@ def __call__(self, X, Z=None):
108
108
109
109
class Stationary (Covariance ):
110
110
R"""
111
- Base class for stationary covariance functions.
111
+ Base class for stationary kernels/ covariance functions.
112
112
113
113
Parameters
114
114
----------
@@ -142,8 +142,8 @@ def euclidean_dist(self, X, Z):
142
142
143
143
class ExpQuad (Stationary ):
144
144
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.
147
147
148
148
.. math::
149
149
@@ -157,7 +157,7 @@ def __call__(self, X, Z=None):
157
157
158
158
class RatQuad (Stationary ):
159
159
R"""
160
- The rational quadratic kernel.
160
+ The Rational Quadratic kernel.
161
161
162
162
.. math::
163
163
@@ -220,7 +220,7 @@ def __call__(self, X, Z=None):
220
220
221
221
class Cosine (Stationary ):
222
222
R"""
223
- The cosine kernel.
223
+ The Cosine kernel.
224
224
225
225
.. math::
226
226
k(x, x') = \mathrm{cos}\left( \frac{||x - x'||}{ \ell^2} \right)
@@ -233,7 +233,7 @@ def __call__(self, X, Z=None):
233
233
234
234
class Linear (Covariance ):
235
235
R"""
236
- The linear kernel.
236
+ The Linear kernel.
237
237
238
238
.. math::
239
239
k(x, x') = (x - c)(x' - c)
@@ -255,7 +255,7 @@ def __call__(self, X, Z=None):
255
255
256
256
class Polynomial (Linear ):
257
257
R"""
258
- The polynomial covariance function .
258
+ The Polynomial kernel .
259
259
260
260
.. math::
261
261
k(x, x') = [(x - c)(x' - c) + \mathrm{offset}]^{d}
@@ -273,11 +273,11 @@ def __call__(self, X, Z=None):
273
273
274
274
class WarpedInput (Covariance ):
275
275
R"""
276
- Warp the inputs of any covariance function using an arbitrary function
276
+ Warp the inputs of any kernel using an arbitrary function
277
277
defined using Theano.
278
278
279
279
.. math::
280
- k_{\mathrm{warped}} (x, x') = k(w(x), w(x'))
280
+ k (x, x') = k(w(x), w(x'))
281
281
282
282
Parameters
283
283
----------
@@ -308,18 +308,19 @@ def __call__(self, X, Z=None):
308
308
309
309
class Gibbs (Covariance ):
310
310
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.
312
313
313
314
.. 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]
316
317
317
318
Parameters
318
319
----------
319
320
lengthscale_func : callable
320
321
Theano function of X and additional optional arguments.
321
322
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 .
323
324
"""
324
325
def __init__ (self , input_dim , lengthscale_func , args = None , active_dims = None ):
325
326
Covariance .__init__ (self , input_dim , active_dims )
0 commit comments