pub struct UnivariateGaussianState { /* private fields */ }Expand description
Fitted statistics for the UnivariateGaussian model after one call to
ProbabilityModel::fit.
Both vectors have length genome_dim. On the prior path (prev = None)
they are initialised from UnivariateGaussianParams::init_mean /
init_std²; on subsequent calls they hold the unweighted MLE estimates
computed from the truncation-selected population.
Fields are private so a mismatched mean / variance length (or a
negative / non-finite variance) is unrepresentable from outside this
module; use try_new to build one and
the mean /
variance accessors to read it.
Implementations§
Source§impl UnivariateGaussianState
impl UnivariateGaussianState
Sourcepub fn try_new(mean: Vec<f32>, variance: Vec<f32>) -> Result<Self, ConfigError>
pub fn try_new(mean: Vec<f32>, variance: Vec<f32>) -> Result<Self, ConfigError>
Builds a fitted Gaussian state from per-dimension mean and variance.
§Errors
Returns a ConfigError if mean is empty, if mean and variance
differ in length, or if any variance is negative or non-finite. A
variance is a squared deviation, so it must be >= 0 and finite.
Trait Implementations§
Source§impl Clone for UnivariateGaussianState
impl Clone for UnivariateGaussianState
Source§fn clone(&self) -> UnivariateGaussianState
fn clone(&self) -> UnivariateGaussianState
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for UnivariateGaussianState
impl RefUnwindSafe for UnivariateGaussianState
impl Send for UnivariateGaussianState
impl Sync for UnivariateGaussianState
impl Unpin for UnivariateGaussianState
impl UnsafeUnpin for UnivariateGaussianState
impl UnwindSafe for UnivariateGaussianState
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
Source§impl<C> CloneExpand for Cwhere
C: Clone,
impl<C> CloneExpand for Cwhere
C: Clone,
fn __expand_clone_method(&self, _scope: &mut Scope) -> C
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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>
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>
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