pub struct Tversky {
pub alpha: f64,
pub beta: f64,
pub bias: f64,
}Expand description
Tversky similarity is a generalization of SorensenDice and Jaccard.
Fields§
§alpha: f64α, the weight of the first sequence (the “prototype”).
beta: f64β, the weight of the second sequence (the “variant”).
bias: f64The symmetric Tversky index bias parameter.
Trait Implementations§
Source§impl Algorithm<f64> for Tversky
impl Algorithm<f64> for Tversky
Source§fn for_iter<C, E>(&self, s1: C, s2: C) -> Result<f64>
fn for_iter<C, E>(&self, s1: C, s2: C) -> Result<f64>
Calculate distance/similarity for iterators. Read more
Source§fn for_vec<E>(&self, s1: &[E], s2: &[E]) -> Result<R>
fn for_vec<E>(&self, s1: &[E], s2: &[E]) -> Result<R>
Calculate distance/similarity for vectors. Read more
Source§fn for_str(&self, s1: &str, s2: &str) -> Result<R>
fn for_str(&self, s1: &str, s2: &str) -> Result<R>
Calculate distance/similarity for strings. Read more
Auto Trait Implementations§
impl Freeze for Tversky
impl RefUnwindSafe for Tversky
impl Send for Tversky
impl Sync for Tversky
impl Unpin for Tversky
impl UnwindSafe for Tversky
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more