[][src]Struct dt_analysis::anomaly::Keogh

pub struct Keogh {}

Methods

impl Keogh[src]

pub fn brute_force<N>(data: &Vec<N>, n: usize) -> (f64, usize) where
    N: Float
[src]

Brute force algorithm for finding discords. Made private due to substandard performance.

Incredibly accurate, but slow to execute. Always takes n^2 time.

pub fn get_top_n_discords<N>(
    data: &Vec<N>,
    discord_size: usize,
    sax_word_length: usize,
    alpha: usize,
    discord_amnt: usize
) -> Vec<(f64, usize)> where
    N: Float
[src]

The HOT SAX algorithm as proposed by Keogh et al.

Accurate, and faster than the brute force algorithm. Takes between n and n^2 time.

Panics

  • sax_word_length is larger than discord size.
  • alpha is under 3 or over 7.

Returns

A list of the distances of the top n discords (0), as well as their locations. (1) This list can have less elements if less discords were found.

pub fn get_top_discord<N>(
    data: &Vec<N>,
    discord_size: usize,
    sax_word_length: usize,
    alpha: usize
) -> Option<(f64, usize)> where
    N: Float
[src]

The HOT SAX algorithm as proposed by Keogh et al. As suggested by the paper, the alphabet size used is hardcoded as 3.

Accurate, and faster than the brute force algorithm. Takes between n and n^2 time.

A shortcut function to get_top_n_discords(..., 1)

Panics

sax_word_length is larger than discord size.

Returns

The distance of the best discord (0), as well as its location. (1)

If such a discord isn't found, this function returns None.

Auto Trait Implementations

impl RefUnwindSafe for Keogh

impl Send for Keogh

impl Sync for Keogh

impl Unpin for Keogh

impl UnwindSafe for Keogh

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.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,