new metrics
Browse files
src/leaderboard/processor.py
CHANGED
@@ -64,11 +64,14 @@ def calculate_integral_score(row: pd.Series) -> float:
|
|
64 |
normalized_time = (runtime - MIN_PUNISHABLE_RUNTIME_MS) / (
|
65 |
MAX_PUNISHABLE_RUNTIME_MS - MIN_PUNISHABLE_RUNTIME_MS
|
66 |
)
|
67 |
-
|
|
|
68 |
else:
|
|
|
69 |
time_factor = 1.0 if runtime <= MIN_PUNISHABLE_RUNTIME_MS else (1.0 - MAX_RUNTIME_PENALTY)
|
70 |
|
71 |
-
|
|
|
72 |
integral_score *= time_factor
|
73 |
|
74 |
# Rooting is not done in the reference library's summary table calculation
|
|
|
64 |
normalized_time = (runtime - MIN_PUNISHABLE_RUNTIME_MS) / (
|
65 |
MAX_PUNISHABLE_RUNTIME_MS - MIN_PUNISHABLE_RUNTIME_MS
|
66 |
)
|
67 |
+
# Match reference library formula 1
|
68 |
+
time_factor = 1.0 - (1.0 - MAX_RUNTIME_PENALTY) * normalized_time
|
69 |
else:
|
70 |
+
# Match reference library formula (though less critical when max==min)
|
71 |
time_factor = 1.0 if runtime <= MIN_PUNISHABLE_RUNTIME_MS else (1.0 - MAX_RUNTIME_PENALTY)
|
72 |
|
73 |
+
# Match reference library formula 2 (enforce minimum factor)
|
74 |
+
time_factor = max(MAX_RUNTIME_PENALTY, time_factor)
|
75 |
integral_score *= time_factor
|
76 |
|
77 |
# Rooting is not done in the reference library's summary table calculation
|