Source code for probnum.filtsmooth.particlefiltsmooth._particle_filter_posterior

"""Particle filtering posterior."""

from typing import Optional

import numpy as np

from probnum import randvars
from probnum.filtsmooth.timeseriesposterior import (
    DenseOutputLocationArgType,
    TimeSeriesPosterior,
)
from probnum.type import FloatArgType, RandomStateArgType, ShapeArgType


[docs]class ParticleFilterPosterior(TimeSeriesPosterior): """Posterior distribution of a particle filter.."""
[docs] def __call__(self, t): raise NotImplementedError("Particle filters do not provide dense output.")
# The methods below are not implemented (yet?).
[docs] def interpolate(self, t: FloatArgType) -> randvars.RandomVariable: raise NotImplementedError
[docs] def sample( self, t: Optional[DenseOutputLocationArgType] = None, size: Optional[ShapeArgType] = (), random_state: Optional[RandomStateArgType] = None, ) -> np.ndarray: raise NotImplementedError("Sampling is not implemented.")
[docs] def transform_base_measure_realizations( self, base_measure_realizations: np.ndarray, t: Optional[DenseOutputLocationArgType] = None, ) -> np.ndarray: raise NotImplementedError( "Transforming base measure realizations is not implemented." )