[−][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> 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,
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> 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> 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> 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,
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, 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>,