Reservoir sample in python
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
LICENSE
README.md
reservoir_sample.py
test_reservoir_sample.py

README.md

reservoir-sample

Python实现蓄水池抽样算法

简介

主要逻辑在reservoir_sample.py文件中 test_reservoir_sample.py文件中有单元测试,测试后如果输出的字典中,各个元素被抽取的次数相当,则能证明算法达到要求。