Skip to content

GaussianRandomWalk prior predictive is broken #3962

Closed
@michaelosthege

Description

@michaelosthege

Description of your problem

When running a sample_prior_predictive for a GaussianRandomWalk, the result looks not even close to what one would expect:

x = numpy.arange(0, 10)
with pymc3.Model() as pmodel:
    grw = pymc3.GaussianRandomWalk('grw', mu=0, sd=1, shape=len(x))
    pp = pymc3.sample_prior_predictive()
fig, (left, right) = pyplot.subplots(ncols=2, figsize=(10,5))
for i in numpy.random.randint(0, 500, size=40):
    left.plot(x, pp['grw'][i,:])
left.set_title('sample_prior_predictive')    
for _ in range(50):
    right.plot(x, grw.random())
right.set_title('.random()')
pyplot.show()

image

Versions and main components

  • PyMC3 Version: latest master
  • Theano Version: the one and only
  • Python Version: 3.6.8
  • Operating system: Windows
  • How did you install PyMC3: pip

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions