#[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 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for KernelType
Source§impl Debug for KernelType
impl Debug for KernelType
Source§impl<'de> Deserialize<'de> for KernelType
Available on crate feature serde only.
impl<'de> Deserialize<'de> for KernelType
Available on crate feature
serde only.Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for KernelType
Source§impl Hash for KernelType
impl Hash for KernelType
Source§impl PartialEq for KernelType
impl PartialEq for KernelType
Source§fn eq(&self, other: &KernelType) -> bool
fn eq(&self, other: &KernelType) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for KernelType
Available on crate feature serde only.
impl Serialize for KernelType
Available on crate feature
serde only.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 UnsafeUnpin 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more