Documentation
¶
Overview ¶
Package scoring holds the score arithmetic the detectors and engine layers share, so every caller combines independent signals the same way.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NoisyOr ¶
NoisyOr combines independent signal weights as 1 - Π(1 - w). Each weight is clamped to [0, 1] and NaN counts as 0, so the result is always in [0, 1]. No weights give 0. The weights are multiplied in sorted order, so the result does not depend on the order they come in (a map's, say) down to the last bit.
Types ¶
type MaxPerKey ¶
type MaxPerKey[K comparable] map[K]float64
MaxPerKey keeps the highest weight seen for each key, so a signal that fires many times counts once. Its NoisyOr is the score of a set of detections: noisy-or over distinct keys, each at its highest weight.