#[repr(i32)]pub enum KernelType {
Linear = 0,
Polynomial = 1,
Rbf = 2,
Sigmoid = 3,
Precomputed = 4,
}Expand description
Type of kernel function.
Matches the integer constants in the original LIBSVM (svm.h):
LINEAR=0, POLY=1, RBF=2, SIGMOID=3, PRECOMPUTED=4.
Variants§
Linear = 0
K(x,y) = x·y
Polynomial = 1
K(x,y) = (γ·x·y + coef0)^degree
Rbf = 2
K(x,y) = exp(-γ·‖x-y‖²)
Sigmoid = 3
K(x,y) = tanh(γ·x·y + coef0)
Precomputed = 4
Kernel values supplied as a precomputed matrix.
Trait Implementations§
Source§impl Clone for KernelType
impl Clone for KernelType
Source§fn clone(&self) -> KernelType
fn clone(&self) -> KernelType
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for KernelType
impl Debug for KernelType
Source§impl Hash for KernelType
impl Hash for KernelType
Source§impl PartialEq for KernelType
impl PartialEq for KernelType
impl Copy for KernelType
impl Eq for KernelType
impl StructuralPartialEq for KernelType
Auto Trait Implementations§
impl Freeze for KernelType
impl RefUnwindSafe for KernelType
impl Send for KernelType
impl Sync for KernelType
impl Unpin for KernelType
impl UnwindSafe for KernelType
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more