Skip to content

Commit

Permalink
bugfix(prob) WIP: handle sigma > q -- need a better condition
Browse files Browse the repository at this point in the history
  • Loading branch information
bencrts committed Aug 22, 2023
1 parent cf36315 commit 44f0716
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions estimator/prob.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,5 +124,8 @@ def amplify_sigma(target_advantage, sigma, q):
sigma = sum(sigma_**2 for sigma_ in sigma).sqrt()
except TypeError:
pass
if sigma > q:
return oo

advantage = float(exp(-float(pi) * (float(sigma / q) ** 2)))
return amplify(target_advantage, advantage, majority=True)

0 comments on commit 44f0716

Please sign in to comment.