pub struct GaussCPDP { /* private fields */ }Expand description
Parameters of a Gaussian CPD.
Implementations§
Source§impl GaussCPDP
impl GaussCPDP
Sourcepub fn new(a: Array2<f64>, b: Array1<f64>, s: Array2<f64>) -> Self
pub fn new(a: Array2<f64>, b: Array1<f64>, s: Array2<f64>) -> Self
Creates a new GaussCPDP instance.
§Arguments
a- Coefficient matrix |X| x |Z|.b- Intercept vector |X|.s- Covariance matrix |X| x |X|.
§Panics
- Panics if the number of rows of
adoes not match the size ofb. - Panics if the number of rows of
adoes not match the size ofs. - Panics if
sis not square and symmetric. - Panics if any of the values in
a,b, orsare not finite.
§Returns
A new GaussCPDP instance.
Sourcepub const fn coefficients(&self) -> &Array2<f64>
pub const fn coefficients(&self) -> &Array2<f64>
Sourcepub const fn covariance(&self) -> &Array2<f64>
pub const fn covariance(&self) -> &Array2<f64>
Trait Implementations§
Source§impl AbsDiffEq for GaussCPDP
impl AbsDiffEq for GaussCPDP
Source§fn default_epsilon() -> Self::Epsilon
fn default_epsilon() -> Self::Epsilon
The default tolerance to use when testing values that are close together. Read more
Source§fn abs_diff_eq(&self, other: &Self, epsilon: Self::Epsilon) -> bool
fn abs_diff_eq(&self, other: &Self, epsilon: Self::Epsilon) -> bool
A test for equality that uses the absolute difference to compute the approximate
equality of two numbers.
Source§fn abs_diff_ne(&self, other: &Rhs, epsilon: Self::Epsilon) -> bool
fn abs_diff_ne(&self, other: &Rhs, epsilon: Self::Epsilon) -> bool
The inverse of
AbsDiffEq::abs_diff_eq.Source§impl<'de> Deserialize<'de> for GaussCPDP
impl<'de> Deserialize<'de> for GaussCPDP
Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl RelativeEq for GaussCPDP
impl RelativeEq for GaussCPDP
Source§fn default_max_relative() -> Self::Epsilon
fn default_max_relative() -> Self::Epsilon
The default relative tolerance for testing values that are far-apart. Read more
Source§fn relative_eq(
&self,
other: &Self,
epsilon: Self::Epsilon,
max_relative: Self::Epsilon,
) -> bool
fn relative_eq( &self, other: &Self, epsilon: Self::Epsilon, max_relative: Self::Epsilon, ) -> bool
A test for equality that uses a relative comparison if the values are far apart.
Source§fn relative_ne(
&self,
other: &Rhs,
epsilon: Self::Epsilon,
max_relative: Self::Epsilon,
) -> bool
fn relative_ne( &self, other: &Rhs, epsilon: Self::Epsilon, max_relative: Self::Epsilon, ) -> bool
The inverse of
RelativeEq::relative_eq.Auto Trait Implementations§
impl Freeze for GaussCPDP
impl RefUnwindSafe for GaussCPDP
impl Send for GaussCPDP
impl Sync for GaussCPDP
impl Unpin for GaussCPDP
impl UnwindSafe for GaussCPDP
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