pub trait BocpdLike<T> {
    type Fx: Rv<T>;
    type PosteriorPredictive: Rv<Self::Fx>;

    // Required methods
    fn step(&mut self, value: &T) -> &[f64];
    fn reset(&mut self);
    fn pp(&self) -> Self::PosteriorPredictive;
    fn preload(&mut self, data: &[T]);
}
Expand description

Trait for implementors of Bayesian online change-point detection

Required Associated Types§

source

type Fx: Rv<T>

Type of type of distribution

source

type PosteriorPredictive: Rv<Self::Fx>

Type of predictive prior distribution

Required Methods§

source

fn step(&mut self, value: &T) -> &[f64]

Update the run-length detector and return a sequence of run length probabilities.

source

fn reset(&mut self)

Reset internal state, new run-lengths will refer to steps after this point.

source

fn pp(&self) -> Self::PosteriorPredictive

Generate the posterior predictive distribution

source

fn preload(&mut self, data: &[T])

Preload a seqeunce into the default suff stat

Implementors§

source§

impl<K> BocpdLike<f64> for Argpcp<K>where K: Kernel,

source§

impl<X, Fx, Pr> BocpdLike<X> for Bocpd<X, Fx, Pr>where Fx: Rv<X> + HasSuffStat<X>, Pr: ConjugatePrior<X, Fx, Posterior = Pr> + Clone, Fx::Stat: Clone,

§

type Fx = Fx

§

type PosteriorPredictive = Mixture<Pr>

source§

impl<X, Fx, Pr> BocpdLike<X> for BocpdTruncated<X, Fx, Pr>where Fx: Rv<X> + HasSuffStat<X>, Pr: ConjugatePrior<X, Fx, Posterior = Pr> + Clone, Fx::Stat: Clone,

§

type Fx = Fx

§

type PosteriorPredictive = Mixture<Pr>