pub struct SquaredExponentialCorr();Expand description
Squared exponential correlation models
Trait Implementations§
Source§impl Clone for SquaredExponentialCorr
impl Clone for SquaredExponentialCorr
Source§fn clone(&self) -> SquaredExponentialCorr
fn clone(&self) -> SquaredExponentialCorr
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<F: Float> CorrelationModel<F> for SquaredExponentialCorr
impl<F: Float> CorrelationModel<F> for SquaredExponentialCorr
Source§fn rval_from_distances(
&self,
d: &ArrayBase<impl Data<Elem = F>, Ix2>,
theta: &ArrayBase<impl Data<Elem = F>, Ix1>,
weights: &ArrayBase<impl Data<Elem = F>, Ix2>,
) -> Array2<F>
fn rval_from_distances( &self, d: &ArrayBase<impl Data<Elem = F>, Ix2>, theta: &ArrayBase<impl Data<Elem = F>, Ix1>, weights: &ArrayBase<impl Data<Elem = F>, Ix2>, ) -> Array2<F>
d h prod prod exp( - |theta_l * weight_j_l * d_j|^2 / 2 ) j=1 l=1
Source§fn jac(
&self,
x: &ArrayBase<impl Data<Elem = F>, Ix1>,
xtrain: &ArrayBase<impl Data<Elem = F>, Ix2>,
theta: &ArrayBase<impl Data<Elem = F>, Ix1>,
weights: &ArrayBase<impl Data<Elem = F>, Ix2>,
) -> Array2<F>
fn jac( &self, x: &ArrayBase<impl Data<Elem = F>, Ix1>, xtrain: &ArrayBase<impl Data<Elem = F>, Ix2>, theta: &ArrayBase<impl Data<Elem = F>, Ix1>, weights: &ArrayBase<impl Data<Elem = F>, Ix2>, ) -> Array2<F>
Compute gradients of
r(x, x') at given x given a set of x' training samples, aka xtrain,
theta parameters, and PLS weights.
The returned jacobian matrix is dr/dx where r is the correlation function vector between x and xtrain (shape nt).
Gradients are computed with respect to x and returned as a matrix of shape (nt, nx)
where nt is the number of training samples (aka xtrain.nrows()) and nx is the dimension of x.Source§fn rval_with_jac(
&self,
x: &ArrayBase<impl Data<Elem = F>, Ix1>,
xtrain: &ArrayBase<impl Data<Elem = F>, Ix2>,
theta: &ArrayBase<impl Data<Elem = F>, Ix1>,
weights: &ArrayBase<impl Data<Elem = F>, Ix2>,
) -> (Array2<F>, Array2<F>)
fn rval_with_jac( &self, x: &ArrayBase<impl Data<Elem = F>, Ix1>, xtrain: &ArrayBase<impl Data<Elem = F>, Ix2>, theta: &ArrayBase<impl Data<Elem = F>, Ix1>, weights: &ArrayBase<impl Data<Elem = F>, Ix2>, ) -> (Array2<F>, Array2<F>)
Compute both the correlation function matrix
r(x, x') and its jacobian at given x
given a set of xtrain training samples, theta parameters, and PLS weights.
Used to avoid redundant computations when both correlation and jacobian are needed.Source§fn theta_influence_factors(&self) -> (F, F)
fn theta_influence_factors(&self) -> (F, F)
Returns the theta influence factors for the correlation model.
See https://hal.science/hal-03812073v2/document
Source§fn rval(
&self,
x: &ArrayBase<impl Data<Elem = F>, Ix1>,
xtrain: &ArrayBase<impl Data<Elem = F>, Ix2>,
theta: &ArrayBase<impl Data<Elem = F>, Ix1>,
weights: &ArrayBase<impl Data<Elem = F>, Ix2>,
) -> Array2<F>
fn rval( &self, x: &ArrayBase<impl Data<Elem = F>, Ix1>, xtrain: &ArrayBase<impl Data<Elem = F>, Ix2>, theta: &ArrayBase<impl Data<Elem = F>, Ix1>, weights: &ArrayBase<impl Data<Elem = F>, Ix2>, ) -> Array2<F>
Compute correlation function r(x, x’) given x and a set of
x' training samples, aka xtrain
theta parameters, and PLS weights with: Read moreSource§impl Debug for SquaredExponentialCorr
impl Debug for SquaredExponentialCorr
Source§impl Default for SquaredExponentialCorr
impl Default for SquaredExponentialCorr
Source§fn default() -> SquaredExponentialCorr
fn default() -> SquaredExponentialCorr
Returns the “default value” for a type. Read more
Source§impl Display for SquaredExponentialCorr
impl Display for SquaredExponentialCorr
Source§impl From<SquaredExponentialCorr> for String
impl From<SquaredExponentialCorr> for String
Source§fn from(_item: SquaredExponentialCorr) -> String
fn from(_item: SquaredExponentialCorr) -> String
Converts to this type from the input type.
Source§impl PartialEq for SquaredExponentialCorr
impl PartialEq for SquaredExponentialCorr
Source§impl TryFrom<String> for SquaredExponentialCorr
impl TryFrom<String> for SquaredExponentialCorr
impl Copy for SquaredExponentialCorr
impl Eq for SquaredExponentialCorr
impl StructuralPartialEq for SquaredExponentialCorr
Auto Trait Implementations§
impl Freeze for SquaredExponentialCorr
impl RefUnwindSafe for SquaredExponentialCorr
impl Send for SquaredExponentialCorr
impl Sync for SquaredExponentialCorr
impl Unpin for SquaredExponentialCorr
impl UnsafeUnpin for SquaredExponentialCorr
impl UnwindSafe for SquaredExponentialCorr
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.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