前两天刚拿到这个小公司的 take home,想请教一下大牛这道题怎么解,
.1point3acres
有一个红外线的感应,每次有人过去会产生干扰,就算作为1次,但如果2个人同时过去,也算作1次。-baidu 1point3acres
如果每小时有1个人通过,100%准确,如果每小时有100000人通过,准确率为0,如果每小时有几百到1000多人通过,就会有一部分产生同时过的情况。
要求写程序模拟beam count
1 -- Writ function that, given 1) a sample refresh rate and2) an expected mean rate of observable events, generates a simulated eventstreams with the same mean. For example: class pe(): def__init__(self, rate, refresh): pass def next(self): # this should return values such that if called # refresh *rate denominator times, # it willoutput the rate pass 2 -- Write function that uses the above to generate mockevents that are sent to a mock door counter. Pick some fixed, realistic windowof time during which a target will traverse a beam, and if two events happen tobe triggered during that window of overlap, count them as 1 and register themissed count. . check 1point3acres for more.
感觉是要用piossion distribution, lambda=rate, 但是想不明白这个refresh rate是怎么回事,红外线的refresh rate 跟这个模拟实验有什么关系。 请教牛人指点! |