pub struct RBFKernel {
pub length_scale: f64,
pub signal_variance: f64,
}Expand description
RBF (Gaussian) kernel implementation with optimized computations
Fields§
§length_scale: f64Length scale parameter
signal_variance: f64Signal variance parameter
Implementations§
Trait Implementations§
Source§impl SparseKernel for RBFKernel
impl SparseKernel for RBFKernel
Source§fn kernel_matrix(&self, x1: &Array2<f64>, x2: &Array2<f64>) -> Array2<f64>
fn kernel_matrix(&self, x1: &Array2<f64>, x2: &Array2<f64>) -> Array2<f64>
Compute kernel matrix between two sets of points
Source§fn kernel_diagonal(&self, x: &Array2<f64>) -> Array1<f64>
fn kernel_diagonal(&self, x: &Array2<f64>) -> Array1<f64>
Compute kernel diagonal (for efficiency when x1 == x2)
Source§fn parameters(&self) -> Vec<f64>
fn parameters(&self) -> Vec<f64>
Get kernel hyperparameters
Source§fn set_parameters(&mut self, params: &[f64])
fn set_parameters(&mut self, params: &[f64])
Set kernel hyperparameters
Auto Trait Implementations§
impl Freeze for RBFKernel
impl RefUnwindSafe for RBFKernel
impl Send for RBFKernel
impl Sync for RBFKernel
impl Unpin for RBFKernel
impl UnwindSafe for RBFKernel
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