Spaces:
Runtime error
Runtime error
Commit
·
ca72e7a
1
Parent(s):
58fe2aa
Update app.py
Browse files
app.py
CHANGED
@@ -189,7 +189,7 @@ output_y4 = (
|
|
189 |
#Define predict for y1.
|
190 |
def bootstrap_ci(data, model, alpha=0.05):
|
191 |
"""Compute bootstrap confidence intervals"""
|
192 |
-
bootstrapped_probs = [model.predict_proba(resample(data))[0][1] for _ in range(
|
193 |
lower = np.percentile(bootstrapped_probs, 100*(alpha/2.0))
|
194 |
upper = np.percentile(bootstrapped_probs, 100*(1-alpha/2.0))
|
195 |
return lower, upper
|
|
|
189 |
#Define predict for y1.
|
190 |
def bootstrap_ci(data, model, alpha=0.05):
|
191 |
"""Compute bootstrap confidence intervals"""
|
192 |
+
bootstrapped_probs = [model.predict_proba(resample(data))[0][1] for _ in range(100)]
|
193 |
lower = np.percentile(bootstrapped_probs, 100*(alpha/2.0))
|
194 |
upper = np.percentile(bootstrapped_probs, 100*(1-alpha/2.0))
|
195 |
return lower, upper
|