pub enum SVMKernel {
Linear,
Polynomial {
degree: i32,
gamma: Float,
coef0: Float,
},
Rbf {
gamma: Float,
},
Sigmoid {
gamma: Float,
coef0: Float,
},
}Expand description
SVM Kernel types
Variants§
Linear
Linear kernel: K(x, y) = x^T y
Polynomial
Polynomial kernel: K(x, y) = (gamma * x^T y + coef0)^degree
Rbf
Radial Basis Function kernel: K(x, y) = exp(-gamma * ||x - y||^2)
Sigmoid
Sigmoid kernel: K(x, y) = tanh(gamma * x^T y + coef0)
Trait Implementations§
impl Copy for SVMKernel
impl StructuralPartialEq for SVMKernel
Auto Trait Implementations§
impl Freeze for SVMKernel
impl RefUnwindSafe for SVMKernel
impl Send for SVMKernel
impl Sync for SVMKernel
impl Unpin for SVMKernel
impl UnwindSafe for SVMKernel
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,
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