pub struct EvidenceLedger { /* private fields */ }Expand description
A ledger of evidence explaining a match score.
This provides full transparency into why a match received its score, enabling debugging and user explanations.
Implementations§
Source§impl EvidenceLedger
impl EvidenceLedger
Sourcepub fn add(
&mut self,
kind: EvidenceKind,
bayes_factor: f64,
description: EvidenceDescription,
)
pub fn add( &mut self, kind: EvidenceKind, bayes_factor: f64, description: EvidenceDescription, )
Add an evidence entry.
Sourcepub fn entries(&self) -> &[EvidenceEntry]
pub fn entries(&self) -> &[EvidenceEntry]
Get all entries.
Sourcepub fn combined_bayes_factor(&self) -> f64
pub fn combined_bayes_factor(&self) -> f64
Compute the combined Bayes factor (product of all factors).
Sourcepub fn prior_odds(&self) -> Option<f64>
pub fn prior_odds(&self) -> Option<f64>
Get the prior odds (from MatchType entry, if present).
Sourcepub fn posterior_probability(&self) -> f64
pub fn posterior_probability(&self) -> f64
Compute posterior probability from prior odds and evidence.
posterior_prob = posterior_odds / (1 + posterior_odds) where posterior_odds = prior_odds × combined_bf
Trait Implementations§
Source§impl Clone for EvidenceLedger
impl Clone for EvidenceLedger
Source§fn clone(&self) -> EvidenceLedger
fn clone(&self) -> EvidenceLedger
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 moreSource§impl Debug for EvidenceLedger
impl Debug for EvidenceLedger
Source§impl Default for EvidenceLedger
impl Default for EvidenceLedger
Source§fn default() -> EvidenceLedger
fn default() -> EvidenceLedger
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for EvidenceLedger
impl RefUnwindSafe for EvidenceLedger
impl Send for EvidenceLedger
impl Sync for EvidenceLedger
impl Unpin for EvidenceLedger
impl UnsafeUnpin for EvidenceLedger
impl UnwindSafe for EvidenceLedger
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