pub struct EvidenceCalibration { /* private fields */ }Expand description
Bayesian likelihoods assigned to evidence selected by a rule.
Missing aggregation remains the historical independent policy. Canonical bounded calibrations carry a compatibility guard; losing their aggregation field therefore fails closed instead of removing the contribution cap. Guardless bounded calibrations emitted by earlier releases remain readable and are canonicalized when serialized again.
Implementations§
Source§impl EvidenceCalibration
impl EvidenceCalibration
Sourcepub fn new(
selector: EvidenceSelector,
likelihood_if_true: Probability,
likelihood_if_false: Probability,
rationale: impl Into<String>,
) -> Result<Self, RuleEngineError>
pub fn new( selector: EvidenceSelector, likelihood_if_true: Probability, likelihood_if_false: Probability, rationale: impl Into<String>, ) -> Result<Self, RuleEngineError>
Creates a calibrated evidence binding with an explanation.
Sourcepub fn with_aggregation(self, aggregation: EvidenceAggregation) -> Self
pub fn with_aggregation(self, aggregation: EvidenceAggregation) -> Self
Applies an explicit contribution policy to this calibration.
Sourcepub fn selector(&self) -> &EvidenceSelector
pub fn selector(&self) -> &EvidenceSelector
Returns the raw-evidence selector.
Sourcepub fn likelihood_if_true(&self) -> Probability
pub fn likelihood_if_true(&self) -> Probability
Returns P(E|H).
Sourcepub fn likelihood_if_false(&self) -> Probability
pub fn likelihood_if_false(&self) -> Probability
Returns P(E|not H).
Sourcepub const fn aggregation(&self) -> EvidenceAggregation
pub const fn aggregation(&self) -> EvidenceAggregation
Returns how repeated selector matches contribute to the posterior.
Trait Implementations§
Source§impl Clone for EvidenceCalibration
impl Clone for EvidenceCalibration
Source§fn clone(&self) -> EvidenceCalibration
fn clone(&self) -> EvidenceCalibration
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 EvidenceCalibration
impl Debug for EvidenceCalibration
Source§impl<'de> Deserialize<'de> for EvidenceCalibration
impl<'de> Deserialize<'de> for EvidenceCalibration
Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for EvidenceCalibration
Source§impl PartialEq for EvidenceCalibration
impl PartialEq for EvidenceCalibration
Source§impl Serialize for EvidenceCalibration
impl Serialize for EvidenceCalibration
impl StructuralPartialEq for EvidenceCalibration
Auto Trait Implementations§
impl Freeze for EvidenceCalibration
impl RefUnwindSafe for EvidenceCalibration
impl Send for EvidenceCalibration
impl Sync for EvidenceCalibration
impl Unpin for EvidenceCalibration
impl UnsafeUnpin for EvidenceCalibration
impl UnwindSafe for EvidenceCalibration
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more