Trait hpo::similarity::SimilarityCombiner
source · pub trait SimilarityCombiner {
// Required method
fn combine(&self, m: &Matrix<'_, f32>) -> f32;
// Provided methods
fn calculate(&self, m: &Matrix<'_, f32>) -> f32 { ... }
fn row_maxes(&self, m: &Matrix<'_, f32>) -> Vec<f32> { ... }
fn col_maxes(&self, m: &Matrix<'_, f32>) -> Vec<f32> { ... }
fn dim_f32(&self, m: &Matrix<'_, f32>) -> (f32, f32) { ... }
}
Expand description
This trait is needed to calculate the similarity between HpoSet
s.
For similarity calculation between HpoSet
s
the similarity scores must be combined to derive a single f32
value
from a matrix of term - term similarities
hpo
provides some default implementations of SimilarityCombiner
:
StandardCombiner