[−][src]Struct dt_analysis::anomaly::Keogh
Methods
impl Keogh
[src]
pub fn brute_force<N>(data: &Vec<N>, n: usize) -> (f64, usize) where
N: Float,
[src]
N: Float,
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]
data: &Vec<N>,
discord_size: usize,
sax_word_length: usize,
alpha: usize,
discord_amnt: usize
) -> Vec<(f64, usize)> where
N: Float,
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 thandiscord 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]
data: &Vec<N>,
discord_size: usize,
sax_word_length: usize,
alpha: usize
) -> Option<(f64, usize)> where
N: Float,
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]
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>,
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>,