[−][src]Struct friedrich::kernel::SquaredExp
Squared exponential kernel
Equivalent to a gaussian kernel.
k(x,y) = A exp(-||x-y||² / 2l²)
Where A is the amplitude and l the length scale.
Fields
ls: f64
The length scale of the kernel.
ampl: f64
The amplitude of the kernel.
Methods
impl SquaredExp
[src]
pub fn new(ls: f64, ampl: f64) -> SquaredExp
[src]
Construct a new squared exponential kernel (gaussian).
Trait Implementations
impl Kernel for SquaredExp
[src]
const NB_PARAMETERS: usize
[src]
fn kernel<S1: Storage<f64, U1, Dynamic>, S2: Storage<f64, U1, Dynamic>>(
&self,
x1: &Matrix<f64, U1, Dynamic, S1>,
x2: &Matrix<f64, U1, Dynamic, S2>
) -> f64
[src]
&self,
x1: &Matrix<f64, U1, Dynamic, S1>,
x2: &Matrix<f64, U1, Dynamic, S2>
) -> f64
The squared exponential kernel function.
fn gradient<S1: Storage<f64, U1, Dynamic>, S2: Storage<f64, U1, Dynamic>>(
&self,
x1: &Matrix<f64, U1, Dynamic, S1>,
x2: &Matrix<f64, U1, Dynamic, S2>
) -> Vec<f64>
[src]
&self,
x1: &Matrix<f64, U1, Dynamic, S1>,
x2: &Matrix<f64, U1, Dynamic, S2>
) -> Vec<f64>
fn get_parameters(&self) -> Vec<f64>
[src]
fn set_parameters(&mut self, parameters: &[f64])
[src]
fn heuristic_fit<SM: Storage<f64, Dynamic, Dynamic>, SV: Storage<f64, Dynamic, U1>>(
&mut self,
training_inputs: &Matrix<f64, Dynamic, Dynamic, SM>,
training_outputs: &Matrix<f64, Dynamic, U1, SV>
)
[src]
&mut self,
training_inputs: &Matrix<f64, Dynamic, Dynamic, SM>,
training_outputs: &Matrix<f64, Dynamic, U1, SV>
)
impl Clone for SquaredExp
[src]
fn clone(&self) -> SquaredExp
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Copy for SquaredExp
[src]
impl Default for SquaredExp
[src]
Constructs the default Squared Exp kernel.
The defaults are:
- ls = 1
- ampl = 1
fn default() -> SquaredExp
[src]
impl Debug for SquaredExp
[src]
Auto Trait Implementations
impl Send for SquaredExp
impl Sync for SquaredExp
impl Unpin for SquaredExp
impl UnwindSafe for SquaredExp
impl RefUnwindSafe for SquaredExp
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<SS, SP> SupersetOf<SS> for SP where
SS: SubsetOf<SP>,
SS: SubsetOf<SP>,
fn to_subset(&self) -> Option<SS>
fn is_in_subset(&self) -> bool
unsafe fn to_subset_unchecked(&self) -> SS
fn from_subset(element: &SS) -> SP
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,