Update app.py
Browse files
app.py
CHANGED
@@ -15,6 +15,8 @@ df['Scenario'] = df['Scenario'].astype(str)
|
|
15 |
# Function to estimate pass@k
|
16 |
def estimate_pass_at_k(num_samples, num_correct, k):
|
17 |
def estimator(n, c, k):
|
|
|
|
|
18 |
if n - c < k:
|
19 |
return 1.0
|
20 |
return 1.0 - np.prod(1.0 - k / np.arange(n - c + 1, n + 1))
|
|
|
15 |
# Function to estimate pass@k
|
16 |
def estimate_pass_at_k(num_samples, num_correct, k):
|
17 |
def estimator(n, c, k):
|
18 |
+
if n < k:
|
19 |
+
return np.nan
|
20 |
if n - c < k:
|
21 |
return 1.0
|
22 |
return 1.0 - np.prod(1.0 - k / np.arange(n - c + 1, n + 1))
|