Reservoir Sampling

Reservoid sampling lets you sample uniformly from a set when you don’t know how big the set is. This has applications in continual learning and data stream processing since we do not know the length of the stream.

SAM WHO writes up a blog post explaing it visually: https://samwho.dev/reservoir-sampling/ .