pub trait ApproximationQuality:
Send
+ Sync
+ Debug {
// Required methods
fn compute(
&self,
exact_kernel: &Array2<f64>,
approx_kernel: &Array2<f64>,
) -> Result<f64, SklearsError>;
fn name(&self) -> &str;
fn higher_is_better(&self) -> bool;
// Provided method
fn acceptable_threshold(&self) -> Option<f64> { ... }
}Expand description
Approximation quality metrics
Required Methods§
Sourcefn compute(
&self,
exact_kernel: &Array2<f64>,
approx_kernel: &Array2<f64>,
) -> Result<f64, SklearsError>
fn compute( &self, exact_kernel: &Array2<f64>, approx_kernel: &Array2<f64>, ) -> Result<f64, SklearsError>
Compute approximation quality metric
Sourcefn higher_is_better(&self) -> bool
fn higher_is_better(&self) -> bool
Check if higher values indicate better quality
Provided Methods§
Sourcefn acceptable_threshold(&self) -> Option<f64>
fn acceptable_threshold(&self) -> Option<f64>
Get acceptable quality threshold