[−][src]Struct changepoint::Bocpd
Online Bayesian Change Point Detection state container
Implementations
impl<X, Fx, Pr> Bocpd<X, Fx, Pr> where
Fx: Rv<X> + HasSuffStat<X>,
Pr: ConjugatePrior<X, Fx, Posterior = Pr> + Clone,
Fx::Stat: Clone,
[src]
Fx: Rv<X> + HasSuffStat<X>,
Pr: ConjugatePrior<X, Fx, Posterior = Pr> + Clone,
Fx::Stat: Clone,
pub fn new(hazard_lambda: f64, predictive_prior: Pr) -> Self
[src]
Create a new Bocpd analyzer
Parameters
hazard
- The hazard function forP_{gap}
.predictive_prior
- Prior for the predictive distribution.
Example
use changepoint::Bocpd; use rv::prelude::*; let cpd = Bocpd::new( 250.0, NormalGamma::new_unchecked(0.0, 1.0, 1.0, 1.0), );
pub fn reset_with_prior(&mut self, predictive_prior: Pr)
[src]
Reset the introspector and replace the predictive prior
pub fn collapse_stats(self) -> Self
[src]
Reduce the observed values into a new BOCPD with those observed values integrated into the prior.
Trait Implementations
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,
[src]
Fx: Rv<X> + HasSuffStat<X>,
Pr: ConjugatePrior<X, Fx, Posterior = Pr> + Clone,
Fx::Stat: Clone,
type Fx = Fx
Type of type of distribution
type PosteriorPredictive = Mixture<Pr>
Type of predictive prior distribution
fn reset(&mut self)
[src]
fn step(&mut self, data: &X) -> &[f64]
[src]
Update the model with a new datum and return the distribution of run lengths.
fn pp(&self) -> Self::PosteriorPredictive
[src]
fn preload(&mut self, data: &[X])
[src]
impl<X: Clone, Fx: Clone, Pr: Clone> Clone for Bocpd<X, Fx, Pr> where
Fx: Rv<X> + HasSuffStat<X>,
Pr: ConjugatePrior<X, Fx>,
Fx::Stat: Clone,
Fx::Stat: Clone,
Fx::Stat: Clone,
Fx::Stat: Clone,
[src]
Fx: Rv<X> + HasSuffStat<X>,
Pr: ConjugatePrior<X, Fx>,
Fx::Stat: Clone,
Fx::Stat: Clone,
Fx::Stat: Clone,
Fx::Stat: Clone,
impl<X: Debug, Fx: Debug, Pr: Debug> Debug for Bocpd<X, Fx, Pr> where
Fx: Rv<X> + HasSuffStat<X>,
Pr: ConjugatePrior<X, Fx>,
Fx::Stat: Clone,
Fx::Stat: Debug,
Fx::Stat: Debug,
Fx::Stat: Debug,
[src]
Fx: Rv<X> + HasSuffStat<X>,
Pr: ConjugatePrior<X, Fx>,
Fx::Stat: Clone,
Fx::Stat: Debug,
Fx::Stat: Debug,
Fx::Stat: Debug,
Auto Trait Implementations
impl<X, Fx, Pr> RefUnwindSafe for Bocpd<X, Fx, Pr> where
Pr: RefUnwindSafe,
<Fx as HasSuffStat<X>>::Stat: RefUnwindSafe,
Pr: RefUnwindSafe,
<Fx as HasSuffStat<X>>::Stat: RefUnwindSafe,
impl<X, Fx, Pr> Send for Bocpd<X, Fx, Pr> where
Pr: Send,
<Fx as HasSuffStat<X>>::Stat: Send,
Pr: Send,
<Fx as HasSuffStat<X>>::Stat: Send,
impl<X, Fx, Pr> Sync for Bocpd<X, Fx, Pr> where
Pr: Sync,
<Fx as HasSuffStat<X>>::Stat: Sync,
Pr: Sync,
<Fx as HasSuffStat<X>>::Stat: Sync,
impl<X, Fx, Pr> Unpin for Bocpd<X, Fx, Pr> where
Pr: Unpin,
<Fx as HasSuffStat<X>>::Stat: Unpin,
Pr: Unpin,
<Fx as HasSuffStat<X>>::Stat: Unpin,
impl<X, Fx, Pr> UnwindSafe for Bocpd<X, Fx, Pr> where
Pr: UnwindSafe,
<Fx as HasSuffStat<X>>::Stat: UnwindSafe,
Pr: UnwindSafe,
<Fx as HasSuffStat<X>>::Stat: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<SS, SP> SupersetOf<SS> for SP where
SS: SubsetOf<SP>,
SS: SubsetOf<SP>,
fn to_subset(&self) -> Option<SS>
fn is_in_subset(&self) -> bool
unsafe fn to_subset_unchecked(&self) -> SS
fn from_subset(element: &SS) -> SP
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,