I’m doing some Bayesian Structural Time Series modelling in pymc, and as a part of that I’ll probably be extending / rewriting some of the time series distributions (for example, AR1 currently has no
For the most part I’ll be treating all the time series distributions as distributions over variable length sequences, since that makes them easier to reason about.
My current API for
AR1.random is (please excuse the google style docstrings):
class AR1(distribution.Continuous): ... def random(self, length, size): """Generates draws of sequences from the distribution. Achieves this by drawing sequences of gaussian noise using the sd of the distribution, and taking the discounted cumulative sum of the noise over the length of the sequence. Args: length (int): The length of sequences to draw. shape (int or list of ints): The sample shape to draw. Returns: numpy.ndarray: An array of dimensions shape * length. """
I’d be interested in hearing what everyone’s preferences are, and in general what the expected methods are when contributing a distribution.