weighted_sum_fusion

Function weighted_sum_fusion 

Source
pub fn weighted_sum_fusion(
    weighted_lists: Vec<(&str, f32, Vec<(String, f32)>)>,
    top_k: usize,
) -> Vec<FusedResult>
Expand description

Weighted sum fusion

Normalizes scores from each source to [0,1] and combines with weights

§Arguments

  • weighted_lists - List of (source_name, weight, rankings) where rankings are (id, original_score)
  • top_k - Number of results to return

§Returns

Fused results sorted by combined score descending