Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -88,13 +88,13 @@ def calculate_highest_combined_score(data, column):
|
|
88 |
return column, {}
|
89 |
scores = data[column].dropna().tolist()
|
90 |
models = data['Model'].tolist()
|
91 |
-
top_combinations = {r: [] for r in range(2,
|
92 |
-
for r in range(2,
|
93 |
for combination in combinations(zip(scores, models), r):
|
94 |
combined_score = sum(score for score, _ in combination)
|
95 |
top_combinations[r].append((combined_score, tuple(model for _, model in combination)))
|
96 |
top_combinations[r].sort(key=lambda x: x[0], reverse=True)
|
97 |
-
top_combinations[r] = top_combinations[r][:
|
98 |
return column, top_combinations
|
99 |
|
100 |
# Modified function to display the results of the highest combined scores using st.dataframe
|
|
|
88 |
return column, {}
|
89 |
scores = data[column].dropna().tolist()
|
90 |
models = data['Model'].tolist()
|
91 |
+
top_combinations = {r: [] for r in range(2, 6)}
|
92 |
+
for r in range(2, 6):
|
93 |
for combination in combinations(zip(scores, models), r):
|
94 |
combined_score = sum(score for score, _ in combination)
|
95 |
top_combinations[r].append((combined_score, tuple(model for _, model in combination)))
|
96 |
top_combinations[r].sort(key=lambda x: x[0], reverse=True)
|
97 |
+
top_combinations[r] = top_combinations[r][:5]
|
98 |
return column, top_combinations
|
99 |
|
100 |
# Modified function to display the results of the highest combined scores using st.dataframe
|