pub trait KernelFunction {
// Required method
fn compute(&self, x1: &Array1<f64>, x2: &Array1<f64>) -> Result<f64>;
// Provided method
fn compute_matrix(&self, x: &Array2<f64>) -> Result<Array2<f64>> { ... }
}
Expand description
Kernel function for machine learning