pub struct GaussCPD { /* private fields */ }Expand description
A Gaussian CPD.
Implementations§
Source§impl GaussCPD
impl GaussCPD
Sourcepub fn new(
labels: Labels,
conditioning_labels: Labels,
parameters: GaussCPDP,
) -> Self
pub fn new( labels: Labels, conditioning_labels: Labels, parameters: GaussCPDP, ) -> Self
Creates a new Gaussian CPD instance.
§Arguments
labels- Labels of the variables.conditioning_labels- Labels of the conditioning variables.parameters- Parameters of the CPD.
§Panics
- Panics if
labelsandconditioning_labelsare not disjoint. - Panics if the dimensions of
parametersdo not match the lengths oflabelsandconditioning_labels.
§Returns
A new Gaussian CPD instance.
Sourcepub fn with_optionals(
labels: Labels,
conditioning_labels: Labels,
parameters: GaussCPDP,
sample_statistics: Option<GaussCPDS>,
sample_log_likelihood: Option<f64>,
) -> Self
pub fn with_optionals( labels: Labels, conditioning_labels: Labels, parameters: GaussCPDP, sample_statistics: Option<GaussCPDS>, sample_log_likelihood: Option<f64>, ) -> Self
Creates a new Gaussian CPD instance.
§Arguments
labels- Labels of the variables.conditioning_labels- Labels of the conditioning variables.parameters- Parameters of the CPD.sample_statistics- Sample (sufficient) statistics, if any.sample_log_likelihood- Sample log-likelihood, if any.
§Returns
A new Gaussian CPD instance.
Trait Implementations§
Source§impl AbsDiffEq for GaussCPD
impl AbsDiffEq for GaussCPD
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 CPD for GaussCPD
impl CPD for GaussCPD
Source§type Parameters = GaussCPDP
type Parameters = GaussCPDP
The type of the parameters.
Source§type Statistics = GaussCPDS
type Statistics = GaussCPDS
The type of the sufficient statistics.
Source§fn conditioning_labels(&self) -> &Labels
fn conditioning_labels(&self) -> &Labels
Returns the labels of the conditioned variables. Read more
Source§fn parameters(&self) -> &Self::Parameters
fn parameters(&self) -> &Self::Parameters
Returns the parameters. Read more
Source§fn parameters_size(&self) -> usize
fn parameters_size(&self) -> usize
Returns the parameters size. Read more
Source§fn sample_statistics(&self) -> Option<&Self::Statistics>
fn sample_statistics(&self) -> Option<&Self::Statistics>
Returns the sufficient statistics, if any. Read more
Source§fn sample_log_likelihood(&self) -> Option<f64>
fn sample_log_likelihood(&self) -> Option<f64>
Returns the log-likelihood of the fitted dataset, if any. Read more
Source§impl CPDEstimator<GaussCPD> for MLE<'_, GaussTable>
impl CPDEstimator<GaussCPD> for MLE<'_, GaussTable>
Source§impl CPDEstimator<GaussCPD> for MLE<'_, GaussWtdTable>
impl CPDEstimator<GaussCPD> for MLE<'_, GaussWtdTable>
Source§impl<'de> Deserialize<'de> for GaussCPD
impl<'de> Deserialize<'de> for GaussCPD
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 JsonIO for GaussCPD
impl JsonIO for GaussCPD
Source§fn write_json(&self, path: &str)
fn write_json(&self, path: &str)
Write the instance to a JSON file. Read more
Source§impl Labelled for GaussCPD
impl Labelled for GaussCPD
Source§fn label_to_index(&self, x: &str) -> usize
fn label_to_index(&self, x: &str) -> usize
Return the variable index for a given label. Read more
Source§fn index_to_label(&self, x: usize) -> &str
fn index_to_label(&self, x: usize) -> &str
Return the label for a given variable index. Read more
Source§fn index_to(&self, x: usize, other: &Labels) -> usize
fn index_to(&self, x: usize, other: &Labels) -> usize
Maps an index from this model to another model with the same label. Read more
Source§fn indices_to(&self, x: &Set<usize>, other: &Labels) -> Set<usize>
fn indices_to(&self, x: &Set<usize>, other: &Labels) -> Set<usize>
Maps a set of indices from this model to another model with the same labels. Read more
Source§impl ParCPDEstimator<GaussCPD> for MLE<'_, GaussTable>
impl ParCPDEstimator<GaussCPD> for MLE<'_, GaussTable>
Source§impl ParCPDEstimator<GaussCPD> for MLE<'_, GaussWtdTable>
impl ParCPDEstimator<GaussCPD> for MLE<'_, GaussWtdTable>
Source§impl RelativeEq for GaussCPD
impl RelativeEq for GaussCPD
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 GaussCPD
impl RefUnwindSafe for GaussCPD
impl Send for GaussCPD
impl Sync for GaussCPD
impl Unpin for GaussCPD
impl UnwindSafe for GaussCPD
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