Expand description
Offline log-odds reducer for evidence events.
Replaces the online order-dependent accumulator with a pure function over the full event set:
group by (family, polarity), sort each group by weight descending, apply a polarity-specific
diminishing-returns schedule, cap the contribution per group, and sum the discounted signed
log-odds. Order-invariant by construction.
Structs§
- Evidence
Event - A single evidence event collected for offline aggregation.
- Reduction
Result - Result of reducing a full event set, with per-event log-odds attribution.
Enums§
- Evidence
Polarity - Polarity of an evidence event.
Constants§
- CONTRADICTORY_
SCHEDULE - Diminishing-returns schedule for
Contradictoryevidence (softer than positive). - PER_
GROUP_ CAP - Per-(family, polarity) cap on contribution magnitude.
- POSITIVE_
SCHEDULE - Diminishing-returns schedule for
Positiveevidence.
Functions§
- reduce_
all - Total log-odds across all
(family, polarity)groups. - reduce_
family_ polarity - Reduces a single (family, polarity) group of events to a discounted log-odds contribution.
- reduce_
with_ attribution - Reduces all events and reports per-event log-odds attribution under the same sort, schedule,
and cap rules as
reduce_all.contributions[i]corresponds toevents[i]. When a group exceedsPER_GROUP_CAP, every event in that group is scaled bycap / |unclamped_sum|so the group’s contributions sum exactly to the signed cap.