[−][src]Struct changepoint::BOCPD
Online Bayesian Change Point Detection state container
Methods
impl<X, H, Fx, Pr> BOCPD<X, H, Fx, Pr> where
H: Fn(usize) -> f64,
Fx: Rv<X> + HasSuffStat<X>,
Pr: ConjugatePrior<X, Fx>,
Fx::Stat: Clone,
[src]
H: Fn(usize) -> f64,
Fx: Rv<X> + HasSuffStat<X>,
Pr: ConjugatePrior<X, Fx>,
Fx::Stat: Clone,
pub fn new(hazard: H, fx: &Fx, predictive_prior: Arc<Pr>) -> Self
[src]
Create a new BOCPD analyzer
Parameters
hazard
- The hazard function forP_{gap}
.fx
- Predictive distribution. Used for generating an emptySuffStat
.predictive_prior
- Prior for the predictive distribution.
Example
use changepoint::{BOCPD, constant_hazard}; use rv::prelude::*; use std::sync::Arc; let cpd = BOCPD::new( constant_hazard(250.0), &Gaussian::standard(), Arc::new(NormalGamma::new(0.0, 1.0, 1.0, 1.0).unwrap()), );
pub fn step(&mut self, data: &X) -> Vec<f64>
[src]
Update the model with a new datum and return the distribution of run lengths.
Auto Trait Implementations
impl<X, H, Fx, Pr> Unpin for BOCPD<X, H, Fx, Pr> where
H: Unpin,
<Fx as HasSuffStat<X>>::Stat: Unpin,
H: Unpin,
<Fx as HasSuffStat<X>>::Stat: Unpin,
impl<X, H, Fx, Pr> Sync for BOCPD<X, H, Fx, Pr> where
H: Sync,
Pr: Send + Sync,
<Fx as HasSuffStat<X>>::Stat: Sync,
H: Sync,
Pr: Send + Sync,
<Fx as HasSuffStat<X>>::Stat: Sync,
impl<X, H, Fx, Pr> Send for BOCPD<X, H, Fx, Pr> where
H: Send,
Pr: Send + Sync,
<Fx as HasSuffStat<X>>::Stat: Send,
H: Send,
Pr: Send + Sync,
<Fx as HasSuffStat<X>>::Stat: Send,
impl<X, H, Fx, Pr> UnwindSafe for BOCPD<X, H, Fx, Pr> where
H: UnwindSafe,
Pr: RefUnwindSafe,
<Fx as HasSuffStat<X>>::Stat: UnwindSafe,
H: UnwindSafe,
Pr: RefUnwindSafe,
<Fx as HasSuffStat<X>>::Stat: UnwindSafe,
impl<X, H, Fx, Pr> RefUnwindSafe for BOCPD<X, H, Fx, Pr> where
H: RefUnwindSafe,
Pr: RefUnwindSafe,
<Fx as HasSuffStat<X>>::Stat: RefUnwindSafe,
H: RefUnwindSafe,
Pr: RefUnwindSafe,
<Fx as HasSuffStat<X>>::Stat: RefUnwindSafe,
Blanket Implementations
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
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<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> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
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>,