pub enum Normalization {
MinMax,
ZScore,
Sum,
Rank,
None,
}Expand description
Score normalization methods.
Different retrievers produce scores on different scales. Normalization puts them on a common scale before combining.
Variants§
MinMax
Min-max normalization: (score - min) / (max - min) → [0, 1]
Best when score distributions are similar. Sensitive to outliers.
ZScore
Z-score normalization: (score - mean) / std, clipped to [-3, 3]
More robust to outliers. Better when distributions differ.
Sum
Sum normalization: score / sum(scores)
Preserves relative magnitudes. Useful when scores represent probabilities.
Rank
Rank-based: convert scores to ranks, then normalize
Sorts input by score (descending), assigns ranks 0..n-1, then normalizes to [0, 1] range where rank 0 (best) → 1.0, rank n-1 (worst) → 1/n. Ignores score magnitudes entirely. Most robust but loses information.
None
No normalization: use raw scores
Only use when all retrievers use the same scale.
Trait Implementations§
Source§impl Clone for Normalization
impl Clone for Normalization
Source§fn clone(&self) -> Normalization
fn clone(&self) -> Normalization
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more