Spaces:
Sleeping
Sleeping
fschwartzer
commited on
Commit
•
8ed4374
1
Parent(s):
69d0d2d
Update app.py
Browse files
app.py
CHANGED
@@ -244,14 +244,14 @@ with st.container():
|
|
244 |
k_threshold = 5
|
245 |
|
246 |
# Function to perform bootstrap on the predicted target values
|
247 |
-
def bootstrap_stats(
|
248 |
# Reshape the predicted_target array
|
249 |
-
|
250 |
|
251 |
# Bootstrap resampling
|
252 |
bootstrapped_means = []
|
253 |
for _ in range(num_samples):
|
254 |
-
bootstrap_sample = np.random.choice(
|
255 |
bootstrapped_means.append(np.mean(bootstrap_sample))
|
256 |
|
257 |
# Calculate lower and higher bounds
|
|
|
244 |
k_threshold = 5
|
245 |
|
246 |
# Function to perform bootstrap on the predicted target values
|
247 |
+
def bootstrap_stats(bound_data, num_samples=1000):
|
248 |
# Reshape the predicted_target array
|
249 |
+
bound_data = np.array(predicted_target).reshape(-1, 1)
|
250 |
|
251 |
# Bootstrap resampling
|
252 |
bootstrapped_means = []
|
253 |
for _ in range(num_samples):
|
254 |
+
bootstrap_sample = np.random.choice(bound_data.flatten(), len(bound_data), replace=True)
|
255 |
bootstrapped_means.append(np.mean(bootstrap_sample))
|
256 |
|
257 |
# Calculate lower and higher bounds
|