7 ms·
the magic of reservoir sampling is the memory footprint is the size of the output while being completely random. In this particular implementation the order of
by snoble 14y ago
the magic of reservoir sampling is the memory footprint is the size of the output while being completely random. In this particular implementation the order of the output is slightly biased but each row has an equal chance of being in the output.
- snoble 14y agobut yes. it has to wait until the stream is done before producing any output.