Enum linfa_kernel::KernelMethod [−][src]
pub enum KernelMethod<F> {
Gaussian(F),
Linear,
Polynomial(F, F),
}The inner product definition used by a kernel.
There are three methods available:
- Gaussian(eps):
d(x, x') = exp(-norm(x - x')/eps) - Linear:
d(x, x') = <x, x'> - Polynomial(constant, degree):
d(x, x') = (<x, x'> + costant)^(degree)
Variants
Gaussian(eps): exp(-norm(x - x’)/eps)
Euclidean inner product
Polynomial(constant, degree): (<x, x'> + costant)^(degree)
Implementations
impl<F: Float> KernelMethod<F>[src]
impl<F: Float> KernelMethod<F>[src]pub fn distance(&self, a: ArrayView1<'_, F>, b: ArrayView1<'_, F>) -> F[src]
pub fn is_linear(&self) -> bool[src]
Trait Implementations
impl<F: Clone> Clone for KernelMethod<F>[src]
impl<F: Clone> Clone for KernelMethod<F>[src]fn clone(&self) -> KernelMethod<F>[src]
pub fn clone_from(&mut self, source: &Self)1.0.0[src]
Auto Trait Implementations
impl<F> RefUnwindSafe for KernelMethod<F> where
F: RefUnwindSafe,
impl<F> RefUnwindSafe for KernelMethod<F> where
F: RefUnwindSafe, impl<F> Send for KernelMethod<F> where
F: Send,
impl<F> Send for KernelMethod<F> where
F: Send, impl<F> Sync for KernelMethod<F> where
F: Sync,
impl<F> Sync for KernelMethod<F> where
F: Sync, impl<F> Unpin for KernelMethod<F> where
F: Unpin,
impl<F> Unpin for KernelMethod<F> where
F: Unpin, impl<F> UnwindSafe for KernelMethod<F> where
F: UnwindSafe,
impl<F> UnwindSafe for KernelMethod<F> where
F: UnwindSafe,