[][src]Struct pelt::Pelt

pub struct Pelt { /* fields omitted */ }

Pruned Exact Linear Time changepoint detection model.

Arguments

  • jump - Distance between proposal changepoints.
  • min_size - Minimal distance between changepoints.
  • n_samples - No. of samples in signal.
  • loss - Loss function to use.
  • pen - Penalty term.

Example

let mut m = Pelt::new(jump, min_size, loss, pen);
println!("{:?}", m.predict(&signal))

Methods

impl Pelt[src]

pub fn new(
    jump: Option<usize>,
    min_size: Option<usize>,
    loss: Option<&str>,
    pen: f64
) -> Pelt
[src]

Create new Pelt instance. Note that the variable should be created mutable.

Trait Implementations

impl MutEstimator<Vec<usize>> for Pelt[src]

fn fit(&mut self, signal: &Vec2d) -> &Self[src]

Set the number of samples in the signal. Explicit call is not needed.

Panics

if min_size < signal.len()

fn predict(&mut self, signal: &Vec2d) -> Option<Vec<usize>>[src]

Retreive the changepoints in the signal.

Arguments

  • signal - Signals stacked in 2D. All signals should be equal length.

Panics

if min_size < signal.len()

fn fit_predict(&mut self, signal: &Vec2d) -> Option<Vec<usize>>[src]

See predict

Auto Trait Implementations

impl RefUnwindSafe for Pelt

impl Send for Pelt

impl Sync for Pelt

impl Unpin for Pelt

impl UnwindSafe for Pelt

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.