Skip to content

Commit 009899c

Browse files
committed
small fixes to mean.py
1 parent da1ce36 commit 009899c

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

pymc3/gp/mean.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
import theano.tensor as tt
22

3-
__all__ = ['Zero', 'Constant']
3+
__all__ = ['Zero', 'Constant', 'Linear']
4+
45

56
class Mean(object):
67
R"""
78
Base class for mean functions
89
"""
10+
911
def __call__(self, X):
1012
R"""
1113
Evaluate the mean function.
@@ -22,14 +24,17 @@ def __add__(self, other):
2224
def __mul__(self, other):
2325
return Prod(self, other)
2426

27+
2528
class Zero(Mean):
2629
R"""
2730
Zero mean function for Gaussian process.
2831
2932
"""
33+
3034
def __call__(self, X):
3135
return tt.zeros(tt.stack([X.shape[0], ]), dtype='float32')
3236

37+
3338
class Constant(Mean):
3439
R"""
3540
Constant mean function for Gaussian process.
@@ -39,6 +44,7 @@ class Constant(Mean):
3944
c : variable, array or integer
4045
Constant mean value
4146
"""
47+
4248
def __init__(self, c=0):
4349
Mean.__init__(self)
4450
self.c = c
@@ -58,6 +64,7 @@ class Linear(Mean):
5864
intercept : variable, array or integer
5965
Intercept for linear function (Defaults to zero)
6066
"""
67+
6168
def __init__(self, coeffs, intercept=0):
6269
Mean.__init__(self)
6370
self.b = intercept

0 commit comments

Comments
 (0)