MarkovProcess

class probnum.randprocs.markov.MarkovProcess(initarg, initrv, transition)

Bases: probnum.randprocs.RandomProcess

Random processes with the Markov property.

A Markov process is a random process with the additional property that conditioned on the present state of the system its future and past states are independent. This is known as the Markov property or as the process being memoryless. A Markov process can be fully defined via an initial state and a state transition.

Parameters
  • initarg (ndarray) – Initial starting input of the process.

  • initrv (RandomVariable) – Random variable describing the initial state.

  • transition (Transition) – State transition of the system.

See also

RandomProcess

Random processes.

GaussianProcess

Gaussian processes.

Attributes Summary

cov

Covariance function \(k(x_0, x_1)\) of the random process.

dtype

Data type of (elements of) the random process evaluated at an input.

input_ndim

Syntactic sugar for len(input_shape).

input_shape

Shape of inputs to the random process.

mean

Mean function \(m(x) := \mathbb{E}[f(x)]\) of the random process.

output_ndim

Syntactic sugar for len(output_shape).

output_shape

Shape of the random process evaluated at an input.

Methods Summary

__call__(args)

Evaluate the random process at a set of input arguments.

marginal(args)

Batch of random variables defining the marginal distributions at the inputs.

push_forward(args, base_measure, sample)

Transform samples from a base measure into samples from the random process.

sample(rng[, args, size])

Sample paths from the random process.

std(args)

Standard deviation function.

var(args)

Variance function.

Attributes Documentation

cov

Covariance function \(k(x_0, x_1)\) of the random process.

\begin{equation} k(x_0, x_1) := \mathbb{E} \left[ (f(x_0) - \mathbb{E}[f(x_0)]) (f(x_1) - \mathbb{E}[f(x_1)])^\top \right] \end{equation}
Return type

Kernel

dtype

Data type of (elements of) the random process evaluated at an input.

Return type

dtype

input_ndim

Syntactic sugar for len(input_shape).

Return type

int

input_shape

Shape of inputs to the random process.

Return type

Tuple[int, ...]

mean

Mean function \(m(x) := \mathbb{E}[f(x)]\) of the random process.

Return type

Function

output_ndim

Syntactic sugar for len(output_shape).

Return type

int

output_shape

Shape of the random process evaluated at an input.

Return type

Tuple[int, ...]

Methods Documentation

__call__(args)[source]

Evaluate the random process at a set of input arguments.

Parameters

args (Union[floating, ndarray]) – shape= batch_shape + input_shape – (Batch of) input(s) at which to evaluate the random process. Currently, we require batch_shape to have at most one dimension.

Returns

shape= batch_shape + output_shape – Random process evaluated at the input(s).

Return type

randvars.RandomVariable

marginal(args)

Batch of random variables defining the marginal distributions at the inputs.

Parameters

args (TypeVar(InputType)) – shape= batch_shape + input_shape – (Batch of) input(s) at which to evaluate the random process. Currently, we require batch_shape to have at most one dimension.

Return type

_RandomVariableList

push_forward(args, base_measure, sample)

Transform samples from a base measure into samples from the random process.

This function can be used to control sampling from the random process by explicitly passing samples from a base measure evaluated at the input arguments.

Parameters
  • args (TypeVar(InputType)) – Input arguments.

  • base_measure (Type[RandomVariable]) – Base measure. Given as a type of random variable.

  • sample (ndarray) – shape= sample_shape + input_shape – (Batch of) input(s) at which to evaluate the random process. Currently, we require sample_shape to have at most one dimension.

Return type

ndarray

sample(rng, args=None, size=())

Sample paths from the random process.

If no inputs are provided this function returns sample paths which are callables, otherwise random variables corresponding to the input locations are returned.

Parameters
Return type

Union[Callable[[TypeVar(InputType)], TypeVar(OutputType)], TypeVar(OutputType)]

std(args)

Standard deviation function.

Parameters

args (TypeVar(InputType)) – shape= batch_shape + input_shape – (Batch of) input(s) at which to evaluate the standard deviation function.

Returns

shape= batch_shape + output_shape – Standard deviation of the process at args.

Return type

_OutputType

var(args)

Variance function.

Returns the variance function which is the value of the covariance or kernel evaluated elementwise at args for each output dimension separately.

Parameters

args (TypeVar(InputType)) – shape= batch_shape + input_shape – (Batch of) input(s) at which to evaluate the variance function.

Returns

shape= batch_shape + output_shape – Variance of the process at args.

Return type

_OutputType