[−][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.
Methods
impl<X, H, Fx, Pr> BocpdTruncated<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: 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::{BocpdTruncated, constant_hazard}; use rv::prelude::*; use std::sync::Arc; let cpd = BocpdTruncated::new( constant_hazard(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
Trait Implementations
impl<X, H, Fx, Pr> RunLengthDetector<X> for BocpdTruncated<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,
Auto Trait Implementations
impl<X, H, Fx, Pr> RefUnwindSafe for BocpdTruncated<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 BocpdTruncated<X, H, Fx, Pr> where
H: Send,
Pr: Send,
<Fx as HasSuffStat<X>>::Stat: Send,
H: Send,
Pr: Send,
<Fx as HasSuffStat<X>>::Stat: Send,
impl<X, H, Fx, Pr> Sync for BocpdTruncated<X, H, Fx, Pr> where
H: Sync,
Pr: Sync,
<Fx as HasSuffStat<X>>::Stat: Sync,
H: Sync,
Pr: Sync,
<Fx as HasSuffStat<X>>::Stat: Sync,
impl<X, H, Fx, Pr> Unpin for BocpdTruncated<X, H, Fx, Pr> where
H: Unpin,
Pr: Unpin,
<Fx as HasSuffStat<X>>::Stat: Unpin,
H: Unpin,
Pr: Unpin,
<Fx as HasSuffStat<X>>::Stat: Unpin,
impl<X, H, Fx, Pr> UnwindSafe for BocpdTruncated<X, H, Fx, Pr> where
H: UnwindSafe,
Pr: UnwindSafe,
<Fx as HasSuffStat<X>>::Stat: UnwindSafe,
H: 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, 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>,