pub struct GaussCPDS { /* private fields */ }Expand description
Sample (sufficient) statistics for a Gaussian CPD.
Implementations§
Source§impl GaussCPDS
impl GaussCPDS
Sourcepub fn new(
mu_x: Array1<f64>,
mu_z: Array1<f64>,
m_xx: Array2<f64>,
m_xz: Array2<f64>,
m_zz: Array2<f64>,
n: f64,
) -> Self
pub fn new( mu_x: Array1<f64>, mu_z: Array1<f64>, m_xx: Array2<f64>, m_xz: Array2<f64>, m_zz: Array2<f64>, n: f64, ) -> Self
Creates a new GaussCPDS instance.
§Arguments
mu_x- Response mean vector |X|.mu_z- Design mean vector |Z|.m_xx- Response covariance (uncentered) matrix |X| x |X|.m_xz- Cross-covariance (uncentered) matrix |X| x |Z|.m_zz- Design covariance (uncentered) matrix |Z| x |Z|.n- Sample size.
§Panics
- Panics if
mu_xlength does not matchm_xxsize. - Panics if
mu_zlength does not matchm_zzsize. - Panics if
m_xxis not square. - Panics if the number of rows of
m_xzdoes not match the size ofm_xx. - Panics if the number of columns of
m_xzdoes not match the size ofm_zz. - Panics if
m_zzis not square. - Panics if any of the values in
mu_x,mu_z,m_xx,m_xz, orm_zzare not finite. - Panics if
nis not finite or is negative.
§Returns
A new GaussCPDS instance.
Sourcepub fn sample_response_mean(&self) -> &Array1<f64>
pub fn sample_response_mean(&self) -> &Array1<f64>
Sourcepub fn sample_design_mean(&self) -> &Array1<f64>
pub fn sample_design_mean(&self) -> &Array1<f64>
Sourcepub fn sample_response_covariance(&self) -> Array2<f64>
pub fn sample_response_covariance(&self) -> Array2<f64>
Returns the response covariance matrix |X| x |X|.
§Returns
A reference to the response covariance matrix.
Sourcepub fn sample_cross_covariance(&self) -> Array2<f64>
pub fn sample_cross_covariance(&self) -> Array2<f64>
Returns the cross-covariance matrix |X| x (|Z| + 1).
§Returns
A reference to the cross-covariance matrix.
Sourcepub fn sample_design_covariance(&self) -> Array2<f64>
pub fn sample_design_covariance(&self) -> Array2<f64>
Returns the design covariance matrix (|Z| + 1) x (|Z| + 1).
§Returns
A reference to the design covariance matrix.
Sourcepub fn sample_size(&self) -> f64
pub fn sample_size(&self) -> f64
Trait Implementations§
Source§impl AddAssign for GaussCPDS
impl AddAssign for GaussCPDS
Source§fn add_assign(&mut self, other: Self)
fn add_assign(&mut self, other: Self)
Performs the
+= operation. Read moreSource§impl CSSEstimator<GaussCPDS> for SSE<'_, GaussTable>
impl CSSEstimator<GaussCPDS> for SSE<'_, GaussTable>
Source§impl CSSEstimator<GaussCPDS> for SSE<'_, GaussWtdTable>
impl CSSEstimator<GaussCPDS> for SSE<'_, GaussWtdTable>
Source§impl<'de> Deserialize<'de> for GaussCPDS
impl<'de> Deserialize<'de> for GaussCPDS
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 ParCSSEstimator<GaussCPDS> for SSE<'_, GaussTable>
impl ParCSSEstimator<GaussCPDS> for SSE<'_, GaussTable>
Source§impl ParCSSEstimator<GaussCPDS> for SSE<'_, GaussWtdTable>
impl ParCSSEstimator<GaussCPDS> for SSE<'_, GaussWtdTable>
Auto Trait Implementations§
impl Freeze for GaussCPDS
impl RefUnwindSafe for GaussCPDS
impl Send for GaussCPDS
impl Sync for GaussCPDS
impl Unpin for GaussCPDS
impl UnwindSafe for GaussCPDS
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