Why it matters
Weighted sampling matches probability to importance. Foundational in ML and analytics.
Advertisement
The architecture
Key = U^(1/w) per item.
Keep top-k by key.
Uniform w.r.t. weights.
Advertisement
How it works end to end
A-Res algorithm.
Min-heap of size k on keys.
Uniform under weights.