作业在 链接
[Hoeffding Inequality]
我先用100组数据进行测试,基本可以得到最后的结果:
import random
def fun():
#Initially
c_1 = None
c_min = None
c_rand = None
array = []
for i in range(1000):
tmp = 0
for j in range(10):
if random.randint(0,1) == 1:
tmp = tmp + 1
frequence = tmp/10.0
array.append(frequence)
if i == 0:
c_1 = frequence
c_min = c_1
if c_min > frequence:
c_min =