Skip to main content

Kernel

Trait Kernel 

Source
pub trait Kernel<F: Float>:
    Clone
    + Send
    + Sync {
    // Required method
    fn compute(&self, x: &[F], y: &[F]) -> F;
}
Expand description

A kernel function for SVM.

Computes the inner product of two vectors in a (possibly implicit) higher-dimensional feature space.

Required Methods§

Source

fn compute(&self, x: &[F], y: &[F]) -> F

Compute the kernel value between two vectors.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§