pub struct ModelEvidenceData {
pub max_log_likelihood: f64,
pub n_parameters: usize,
pub n_data_points: usize,
pub hessian_log_determinant: Option<f64>,
pub log_prior: Option<f64>,
pub posterior_samples: Vec<f64>,
pub cv_log_likelihoods: Option<Vec<f64>>,
}Expand description
Data required for evidence estimation
Fields§
§max_log_likelihood: f64Maximum log-likelihood achieved
n_parameters: usizeNumber of model parameters
n_data_points: usizeNumber of data points
hessian_log_determinant: Option<f64>Log determinant of Hessian at MAP (for Laplace approximation)
log_prior: Option<f64>Log prior probability at MAP
posterior_samples: Vec<f64>Posterior samples (log-likelihoods)
cv_log_likelihoods: Option<Vec<f64>>Cross-validation log-likelihoods
Implementations§
Source§impl ModelEvidenceData
impl ModelEvidenceData
Sourcepub fn new(
max_log_likelihood: f64,
n_parameters: usize,
n_data_points: usize,
) -> Self
pub fn new( max_log_likelihood: f64, n_parameters: usize, n_data_points: usize, ) -> Self
Create new evidence data with required fields
Sourcepub fn with_hessian_log_determinant(self, log_det: f64) -> Self
pub fn with_hessian_log_determinant(self, log_det: f64) -> Self
Add Hessian information for Laplace approximation
Sourcepub fn with_log_prior(self, log_prior: f64) -> Self
pub fn with_log_prior(self, log_prior: f64) -> Self
Add prior information
Sourcepub fn with_posterior_samples(self, samples: Vec<f64>) -> Self
pub fn with_posterior_samples(self, samples: Vec<f64>) -> Self
Add posterior samples
Sourcepub fn with_cv_log_likelihoods(self, cv_scores: Vec<f64>) -> Self
pub fn with_cv_log_likelihoods(self, cv_scores: Vec<f64>) -> Self
Add cross-validation log-likelihoods
Trait Implementations§
Source§impl Clone for ModelEvidenceData
impl Clone for ModelEvidenceData
Source§fn clone(&self) -> ModelEvidenceData
fn clone(&self) -> ModelEvidenceData
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for ModelEvidenceData
impl RefUnwindSafe for ModelEvidenceData
impl Send for ModelEvidenceData
impl Sync for ModelEvidenceData
impl Unpin for ModelEvidenceData
impl UnwindSafe for ModelEvidenceData
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