pub struct LogLikelihoodTolerance { /* private fields */ }Expand description
A stopping rule that lets the EM algorithm run until the absolute difference in successive, normalised log-likelihood values falls below some tolerance.
The log-likelihood will be normalised by the number of sites, so that it becomes a per-site measure. This makes it easier to find a reasonable tolerance for a range of input sizes.
Implementations§
Source§impl LogLikelihoodTolerance
impl LogLikelihoodTolerance
Sourcepub fn absolute_difference(&self) -> f64
pub fn absolute_difference(&self) -> f64
Returns the absolute difference between the two most recent normalised log-likelihood values.
Sourcepub fn log_likelihood(&self) -> LogLikelihood
pub fn log_likelihood(&self) -> LogLikelihood
Returns the current, normalised log-likelihood value.
Trait Implementations§
Source§impl<T> Stop<T> for LogLikelihoodTolerance
impl<T> Stop<T> for LogLikelihoodTolerance
Source§impl StoppingRule for LogLikelihoodTolerance
impl StoppingRule for LogLikelihoodTolerance
Source§fn and<S>(self, other: S) -> Both<Self, S>where
Self: Sized,
fn and<S>(self, other: S) -> Both<Self, S>where
Self: Sized,
Returns a new stopping rule that requires that both this and another stopping
rule must indicicate convergence before stopping.
Auto Trait Implementations§
impl Freeze for LogLikelihoodTolerance
impl RefUnwindSafe for LogLikelihoodTolerance
impl Send for LogLikelihoodTolerance
impl Sync for LogLikelihoodTolerance
impl Unpin for LogLikelihoodTolerance
impl UnwindSafe for LogLikelihoodTolerance
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> 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