[−][src]Struct changepoint::BocpdTruncated
Online Bayesian Change Point Detection with a truncated tail
The truncation takes place after run length probabilites are computed. The truncation point is chosen based on the most recent point from which all successive mass is below the given threshold.
Implementations
impl<X, Fx, Pr> BocpdTruncated<X, Fx, Pr> where
Fx: Rv<X> + HasSuffStat<X>,
Pr: ConjugatePrior<X, Fx>,
Fx::Stat: Clone,
[src]
Fx: Rv<X> + HasSuffStat<X>,
Pr: ConjugatePrior<X, Fx>,
Fx::Stat: Clone,
pub fn new(hazard_lambda: f64, fx: Fx, predictive_prior: Pr) -> Self
[src]
Create a new Bocpd analyzer
Parameters
hazard
- The hazard function forP_{gap} = 1/hazard
.fx
- Predictive distribution. Used for generating an emptySuffStat
.predictive_prior
- Prior for the predictive distribution.
Example
use changepoint::BocpdTruncated; use rv::prelude::*; use std::sync::Arc; let cpd = BocpdTruncated::new( 250.0, Gaussian::standard(), NormalGamma::new_unchecked(0.0, 1.0, 1.0, 1.0), );
pub fn with_cutoff(self, cutoff_threadhold: f64) -> Self
[src]
Change the cutoff for mass to be discarded on the tail end of run-lengths
pub fn reset_with_prior(&mut self, predictive_prior: Pr)
[src]
Reset the introspector and replace the predictive prior
Trait Implementations
impl<X: Clone, Fx: Clone, Pr: Clone> Clone for BocpdTruncated<X, Fx, Pr> where
Fx: Rv<X> + HasSuffStat<X>,
Pr: ConjugatePrior<X, Fx>,
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,
fn clone(&self) -> BocpdTruncated<X, Fx, Pr>
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<X: Debug, Fx: Debug, Pr: Debug> Debug for BocpdTruncated<X, Fx, Pr> where
Fx: Rv<X> + HasSuffStat<X>,
Pr: ConjugatePrior<X, Fx>,
Fx::Stat: Clone,
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,
impl<X, Fx, Pr> RunLengthDetector<X> for BocpdTruncated<X, Fx, Pr> where
Fx: Rv<X> + HasSuffStat<X>,
Pr: ConjugatePrior<X, Fx>,
Fx::Stat: Clone,
[src]
Fx: Rv<X> + HasSuffStat<X>,
Pr: ConjugatePrior<X, Fx>,
Fx::Stat: Clone,
Auto Trait Implementations
impl<X, Fx, Pr> RefUnwindSafe for BocpdTruncated<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 BocpdTruncated<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 BocpdTruncated<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 BocpdTruncated<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 BocpdTruncated<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>,