[−][src]Struct pelt::Pelt
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]
jump: Option<usize>,
min_size: Option<usize>,
loss: Option<&str>,
pen: f64
) -> Pelt
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]
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, 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>,