pub struct EvidenceEntry {
pub decision_id: u64,
pub timestamp_ns: u64,
pub domain: DecisionDomain,
pub log_posterior: f64,
pub top_evidence: [Option<EvidenceTerm>; 3],
pub action: &'static str,
pub loss_avoided: f64,
pub confidence_interval: (f64, f64),
}Expand description
Unified evidence record for any Bayesian decision point.
Fixed-size: the top-3 evidence array avoids heap allocation.
Fields§
§decision_id: u64Monotonic decision counter (unique within a session).
timestamp_ns: u64Monotonic timestamp (nanoseconds from program start).
domain: DecisionDomainWhich decision domain this belongs to.
log_posterior: f64Log-posterior odds of the chosen action being optimal.
top_evidence: [Option<EvidenceTerm>; 3]Top-3 evidence terms ranked by |log(BF)|, pre-allocated.
action: &'static strAction taken (e.g., “dirty_rows”, “coalesce”, “degrade_1”).
loss_avoided: f64Expected loss avoided: E[loss(next_best)] - E[loss(chosen)].
Non-negative when the chosen action is optimal.
confidence_interval: (f64, f64)Confidence interval (lower, upper) on the posterior probability.
Implementations§
Source§impl EvidenceEntry
impl EvidenceEntry
Sourcepub fn posterior_probability(&self) -> f64
pub fn posterior_probability(&self) -> f64
Posterior probability derived from log-odds.
Sourcepub fn evidence_count(&self) -> usize
pub fn evidence_count(&self) -> usize
Number of evidence terms present.
Sourcepub fn combined_log_bf(&self) -> f64
pub fn combined_log_bf(&self) -> f64
Combined log Bayes factor (sum of individual log-BFs).
Trait Implementations§
Source§impl Clone for EvidenceEntry
impl Clone for EvidenceEntry
Source§fn clone(&self) -> EvidenceEntry
fn clone(&self) -> EvidenceEntry
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 EvidenceEntry
impl RefUnwindSafe for EvidenceEntry
impl Send for EvidenceEntry
impl Sync for EvidenceEntry
impl Unpin for EvidenceEntry
impl UnwindSafe for EvidenceEntry
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