pub struct MatchConfidence {
pub disposition: SemanticDisposition,
pub top_score: f64,
pub runner_up_score: f64,
pub runner_up_motif: Option<MotifClass>,
pub margin: f64,
pub tier_consensus_factor: f64,
pub confuser_motif: Option<MotifClass>,
pub confuser_score: f64,
pub margin_vs_confuser: f64,
}Expand description
Confidence-bearing motif match result.
Returned by HeuristicsBank::match_episode_with_confidence. The
margin field is (top_score - runner_up_score) / top_score,
clamped to [0.0, 1.0]. Operators reading the margin can calibrate
trust:
- margin > 0.5 → top motif clearly dominates; act on it
- margin in (0.2, 0.5] → moderate confidence; surface runner-up
- margin <= 0.2 → top and runner-up are competitive; surface both
- top_score == 0.0 → no motif matched (
disposition == Unknown)
Fields§
§disposition: SemanticDisposition§top_score: f64§runner_up_score: f64§runner_up_motif: Option<MotifClass>§margin: f64§tier_consensus_factor: f64Phase 3 — fraction of the matched motif’s affinity tiers that
actually fired in the episode range, in [0, 1]. Populated only
by match_episode_with_tier_affinity; the legacy
match_episode_with_consensus leaves this at 0.0. Used by the
adaptive margin gate (Path 3): when tier_consensus_factor > 0.5,
the gate is halved — strong tier evidence justifies lower
margin requirement.
confuser_motif: Option<MotifClass>Phase 5.6 — explicit confuser motif declared by the matched
motif’s HeuristicEntry. May differ from runner_up_motif if
the score-based runner-up is not the declared confuser. None
when no confuser is declared.
confuser_score: f64Phase 5.6 — score of the declared confuser computed in the same scoring pass as the matched motif. 0.0 if no confuser is declared.
margin_vs_confuser: f64Phase 5.6 — margin of top motif over its declared confuser:
(top_score - confuser_score) / top_score, clamped to [0, 1].
Used by fusion’s confuser-aware typed-confirmation gate.
0.0 if no confuser is declared.
Trait Implementations§
Source§impl Clone for MatchConfidence
impl Clone for MatchConfidence
Source§fn clone(&self) -> MatchConfidence
fn clone(&self) -> MatchConfidence
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for MatchConfidence
impl Debug for MatchConfidence
Source§impl PartialEq for MatchConfidence
impl PartialEq for MatchConfidence
Source§fn eq(&self, other: &MatchConfidence) -> bool
fn eq(&self, other: &MatchConfidence) -> bool
self and other values to be equal, and is used by ==.