pub struct CustomLaplacianKernel {
pub gamma: Float,
}Expand description
Custom Laplacian kernel CustomLaplacianKernel
Fields§
§gamma: Floatgamma
Implementations§
Trait Implementations§
Source§impl Clone for CustomLaplacianKernel
impl Clone for CustomLaplacianKernel
Source§fn clone(&self) -> CustomLaplacianKernel
fn clone(&self) -> CustomLaplacianKernel
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 CustomLaplacianKernel
impl Debug for CustomLaplacianKernel
Source§impl KernelFunction for CustomLaplacianKernel
impl KernelFunction for CustomLaplacianKernel
Source§fn kernel(&self, x: &[Float], y: &[Float]) -> Float
fn kernel(&self, x: &[Float], y: &[Float]) -> Float
Compute the kernel value between two vectors
Source§fn fourier_transform(&self, w: &[Float]) -> Float
fn fourier_transform(&self, w: &[Float]) -> Float
Get the characteristic function of the kernel’s Fourier transform
This should return the Fourier transform of the kernel at frequency w
For most kernels, this is needed to generate appropriate random features
Source§fn sample_frequencies(
&self,
n_features: usize,
n_components: usize,
rng: &mut RealStdRng,
) -> Array2<Float>
fn sample_frequencies( &self, n_features: usize, n_components: usize, rng: &mut RealStdRng, ) -> Array2<Float>
Sample random frequencies for Random Fourier Features
This method should sample frequencies according to the spectral measure
of the kernel (i.e., the Fourier transform of the kernel)
Source§fn description(&self) -> String
fn description(&self) -> String
Get a description of the kernel
Auto Trait Implementations§
impl Freeze for CustomLaplacianKernel
impl RefUnwindSafe for CustomLaplacianKernel
impl Send for CustomLaplacianKernel
impl Sync for CustomLaplacianKernel
impl Unpin for CustomLaplacianKernel
impl UnwindSafe for CustomLaplacianKernel
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