Spaces:
Runtime error
Runtime error
sheeptester
commited on
Commit
•
4d8a402
1
Parent(s):
786ebd7
Missing parenthesis
Browse files
app.py
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
import numpy as np
|
2 |
|
3 |
-
|
4 |
def pass_at_k(n, c, k):
|
5 |
"""
|
6 |
:param n: total number of samples
|
@@ -9,6 +9,6 @@ def pass_at_k(n, c, k):
|
|
9 |
"""
|
10 |
if n - c < k: return 1.0
|
11 |
return 1.0 - np.prod(1.0 - k /
|
12 |
-
np.arange(n - c + 1, n + 1)
|
13 |
|
14 |
print(pass_at_k(4, 1, 2))
|
|
|
1 |
import numpy as np
|
2 |
|
3 |
+
# https://arxiv.org/pdf/2107.03374.pdf
|
4 |
def pass_at_k(n, c, k):
|
5 |
"""
|
6 |
:param n: total number of samples
|
|
|
9 |
"""
|
10 |
if n - c < k: return 1.0
|
11 |
return 1.0 - np.prod(1.0 - k /
|
12 |
+
np.arange(n - c + 1, n + 1))
|
13 |
|
14 |
print(pass_at_k(4, 1, 2))
|