Skip to main content

effective_confidence

Function effective_confidence 

Source
pub fn effective_confidence(
    raw_confidence: f32,
    kind: &RuleKind,
    age_days: f32,
) -> f32
Expand description

Apply category-aware exponential decay to a raw confidence value.

effective = raw * 0.5 ^ (age_days / half_life)

At age_days = 0 this returns raw unchanged. After one half-life it returns raw / 2, etc. Used as the input to the existing 0.9 + 0.1 * confidence tie-breaker so old rules naturally lose their tie-breaker bump.