torchfilter.base._kalman_filter_measurement_model

Private module; avoid importing from directly.

Module Contents

Classes

KalmanFilterMeasurementModel

Helper class that provides a standard way to create an ABC using

class torchfilter.base._kalman_filter_measurement_model.KalmanFilterMeasurementModel(*, state_dim, observation_dim)[source]

Bases: abc.ABC, torch.nn.Module

Inheritance diagram of torchfilter.base._kalman_filter_measurement_model.KalmanFilterMeasurementModel

Helper class that provides a standard way to create an ABC using inheritance.

state_dim

State dimensionality.

Type:

int

observation_dim

Observation dimensionality.

Type:

int

abstract forward(self, *, states: types.StatesTorch) Tuple[types.ObservationsNoDictTorch, types.ScaleTrilTorch][source]

Observation model forward pass, over batch size N.

Parameters:

states (torch.Tensor) – States to pass to our observation model. Shape should be (N, state_dim).

Returns:

Tuple[torch.Tensor, torch.Tensor] – tuple containing expected observations and cholesky decomposition of covariance. Shape should be (N, M).

jacobian(self, *, states: types.StatesTorch) torch.Tensor[source]

Returns Jacobian of the measurement model.

Parameters:

states (torch.Tensor) – Current state, size (N, state_dim).

Returns:

torch.Tensor – Jacobian, size (N, observation_dim, state_dim)