pub struct RbfKernel<F> {
pub gamma: Gamma<F>,
}Expand description
Radial Basis Function (Gaussian) kernel.
K(x, y) = exp(-gamma * ||x - y||^2)
Fields§
§gamma: Gamma<F>The gamma parameter, a three-way Gamma<F> spec resolved at fit time
(sklearn/svm/_base.py:235-243). Default Gamma::Scale
(= 1 / (n_features * X.var())); Gamma::Auto = 1 / n_features;
Gamma::Value is used verbatim.
Implementations§
Source§impl<F: Float> RbfKernel<F>
impl<F: Float> RbfKernel<F>
Sourcepub fn with_gamma(gamma: F) -> Self
pub fn with_gamma(gamma: F) -> Self
Create a new RBF kernel with an explicit float gamma
(gamma=<float>, Gamma::Value).
Sourcepub fn with_gamma_scale() -> Self
pub fn with_gamma_scale() -> Self
Create a new RBF kernel with gamma='scale' (Gamma::Scale,
sklearn’s default = 1 / (n_features * X.var())).
Sourcepub fn with_gamma_auto() -> Self
pub fn with_gamma_auto() -> Self
Create a new RBF kernel with gamma='auto' (Gamma::Auto
= 1 / n_features).
Trait Implementations§
impl<F: Copy> Copy for RbfKernel<F>
Auto Trait Implementations§
impl<F> Freeze for RbfKernel<F>where
F: Freeze,
impl<F> RefUnwindSafe for RbfKernel<F>where
F: RefUnwindSafe,
impl<F> Send for RbfKernel<F>where
F: Send,
impl<F> Sync for RbfKernel<F>where
F: Sync,
impl<F> Unpin for RbfKernel<F>where
F: Unpin,
impl<F> UnsafeUnpin for RbfKernel<F>where
F: UnsafeUnpin,
impl<F> UnwindSafe for RbfKernel<F>where
F: UnwindSafe,
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> DistributionExt for Twhere
T: ?Sized,
impl<T> DistributionExt for Twhere
T: ?Sized,
impl<T, U> Imply<T> for U
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