Skip to content

Commit fe885df

Browse files
committed
Renamed the GaussianRandomWalk mu parameter to drift,
and also moved it to the end of parameter list.
1 parent 906107c commit fe885df

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

pymc3/distributions/timeseries.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ class GaussianRandomWalk(Continuous):
4141
4242
Parameters
4343
----------
44-
mu: tensor
44+
drift: tensor
4545
innovation drift, defaults to 0.0
4646
tau : tensor
4747
tau > 0, innovation precision
@@ -50,22 +50,22 @@ class GaussianRandomWalk(Continuous):
5050
init : distribution
5151
distribution for initial value (Defaults to Flat())
5252
"""
53-
def __init__(self, mu=0., tau=None, init=Flat.dist(), sd=None, *args, **kwargs):
53+
def __init__(self, tau=None, init=Flat.dist(), sd=None, drift=0., *args, **kwargs):
5454
super(GaussianRandomWalk, self).__init__(*args, **kwargs)
55-
self.mu = mu
55+
self.drift = drift
5656
self.tau = tau
5757
self.sd = sd
5858
self.init = init
5959
self.mean = 0.
6060

6161
def logp(self, x):
62-
mu = self.mu
62+
drift = self.drift
6363
tau = self.tau
6464
sd = self.sd
6565
init = self.init
6666

6767
x_im1 = x[:-1]
6868
x_i = x[1:]
6969

70-
innov_like = Normal.dist(mu=x_im1 + mu, tau=tau, sd=sd).logp(x_i)
70+
innov_like = Normal.dist(mu=x_im1 + drift, tau=tau, sd=sd).logp(x_i)
7171
return init.logp(x[0]) + sum(innov_like)

0 commit comments

Comments
 (0)