pub struct LikelihoodEvaluator { /* private fields */ }Expand description
A structure to evaluate and minimize combinations of LikelihoodTerms.
Implementations§
Source§impl LikelihoodEvaluator
impl LikelihoodEvaluator
Sourcepub fn minimize(
&self,
settings: MinimizationSettings<Self>,
) -> Result<MinimizationSummary, LadduError>
pub fn minimize( &self, settings: MinimizationSettings<Self>, ) -> Result<MinimizationSummary, LadduError>
Minimize the LikelihoodEvaluator with the algorithm given in the MinimizationSettings.
§Errors
This method may return an error if there was any problem constructing thread pools or evaluating the underlying model.
Sourcepub fn mcmc(
&self,
settings: MCMCSettings<Self>,
) -> Result<MCMCSummary, LadduError>
pub fn mcmc( &self, settings: MCMCSettings<Self>, ) -> Result<MCMCSummary, LadduError>
Run an MCMC sampling algorithm over the LikelihoodEvaluator with the given MCMCSettings.
§Errors
This method may return an error if there was any problem constructing thread pools or evaluating the underlying model.
Trait Implementations§
Source§impl Clone for LikelihoodEvaluator
impl Clone for LikelihoodEvaluator
Source§fn clone(&self) -> LikelihoodEvaluator
fn clone(&self) -> LikelihoodEvaluator
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl CostFunction<MaybeThreadPool, LadduError> for LikelihoodEvaluator
impl CostFunction<MaybeThreadPool, LadduError> for LikelihoodEvaluator
Source§fn evaluate(
&self,
parameters: &DVector<Float>,
args: &MaybeThreadPool,
) -> Result<Float, LadduError>
fn evaluate( &self, parameters: &DVector<Float>, args: &MaybeThreadPool, ) -> Result<Float, LadduError>
x with the given arguments/user data. Read moreSource§impl Gradient<MaybeThreadPool, LadduError> for LikelihoodEvaluator
impl Gradient<MaybeThreadPool, LadduError> for LikelihoodEvaluator
Source§impl LikelihoodTerm for LikelihoodEvaluator
impl LikelihoodTerm for LikelihoodEvaluator
Source§fn parameters(&self) -> Vec<String>
fn parameters(&self) -> Vec<String>
The parameter names used in LikelihoodEvaluator::evaluate’s input in order.
Source§fn evaluate(&self, parameters: &[Float]) -> Float
fn evaluate(&self, parameters: &[Float]) -> Float
A function that can be called to evaluate the sum/product of the LikelihoodTerms
contained by this LikelihoodEvaluator.
Source§fn evaluate_gradient(&self, parameters: &[Float]) -> DVector<Float>
fn evaluate_gradient(&self, parameters: &[Float]) -> DVector<Float>
Evaluate the gradient of the stored LikelihoodExpression over the events in the Dataset
stored by the LikelihoodEvaluator with the given values for free parameters.
Source§impl LogDensity<MaybeThreadPool, LadduError> for LikelihoodEvaluator
impl LogDensity<MaybeThreadPool, LadduError> for LikelihoodEvaluator
Source§fn log_density(
&self,
parameters: &DVector<Float>,
args: &MaybeThreadPool,
) -> Result<Float, LadduError>
fn log_density( &self, parameters: &DVector<Float>, args: &MaybeThreadPool, ) -> Result<Float, LadduError>
x with the given arguments/user data. Read moreAuto Trait Implementations§
impl Freeze for LikelihoodEvaluator
impl !RefUnwindSafe for LikelihoodEvaluator
impl Send for LikelihoodEvaluator
impl Sync for LikelihoodEvaluator
impl Unpin for LikelihoodEvaluator
impl !UnwindSafe for LikelihoodEvaluator
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<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>
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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.