prophys.processes

prophys.processes#

Stochastic processes over time and helpers for path valued expressions.

A Process is a distribution over paths whose samples carry time as their last axis. Wrapped in a RandomVariable it enters a model as a path valued leaf. The module provides autoregressive processes (Autoregressive, RandomWalk, ornstein_uhlenbeck(), circular_autoregressive()), state geometries (LinearGeometry, Circular), coupled processes (JointProcess), user defined state recursions (Recurrence) and reductions along the time axis (time_sum(), time_mean(), time_diff(), discounted_sum(), over_time()).

Classes

Process

Base class of distributions over discretely indexed paths (time series).

Autoregressive

First order autoregressive (AR(1)) process with a pluggable innovation distribution.

RandomWalk

Random walk x_t = x_{t-1} + eps_t that accumulates its innovations.

Geometry

Base class of value spaces for process state: how to take differences and wrap values.

LinearGeometry

The real line: difference is subtraction, placement is the identity.

Circular

The circle of circumference period, for angular state such as directions.

JointProcess

Several autoregressive processes whose innovations are coupled through a Gaussian copula.

Recurrence

User defined, differentiable state that evolves step by step along the time axis.

Functions

ornstein_uhlenbeck

Build an Ornstein Uhlenbeck process dx = theta (mean - x) dt + sigma dW on a regular time grid.

circular_autoregressive

Build an Autoregressive process on the circle, for angular state such as wind direction.

over_time

Append a trailing time axis so a scalar valued expression broadcasts against paths.

time_sum

Sum a path valued expression along the time axis, (..., T) -> (...,).

time_mean

Average a path valued expression along the time axis, (..., T) -> (...,).

time_diff

Take the first difference along the time axis, (..., T) -> (..., T-1).

discounted_sum

Sum a path along the time axis with exponential discounting, (..., T) -> (...,).