(threshold, b, r)
| 16 | |
| 17 | # 利用积分计算fn |
| 18 | def _false_negative_probability(threshold, b, r): |
| 19 | _probability = lambda s : 1 - (1 - (1 - s**float(r))**float(b)) |
| 20 | a, err = integrate(_probability, threshold, 1.0) |
| 21 | return a |
| 22 | |
| 23 | # 利用fp与fn计算最佳的参数 |
| 24 | def _optimal_param(threshold, num_perm, false_positive_weight, |