MCC transofrm for
Browse filesGerman: MCC
Australian: MCC
LendingClub: MCC
ccf: MCC
ccfraud: MCC
polish: MCC
taiwan: MCC
portoseguro: MCC
travelinsurance: MCC
- src/populate.py +8 -1
src/populate.py
CHANGED
@@ -17,11 +17,18 @@ def get_leaderboard_df(results_path: str, requests_path: str, cols: list, benchm
|
|
17 |
df = df.sort_values(by=[AutoEvalColumn.average.name], ascending=False)
|
18 |
df = df[cols].round(decimals=2)
|
19 |
|
20 |
-
#
|
|
|
|
|
|
|
|
|
|
|
|
|
21 |
df = df[has_no_nan_values(df, benchmark_cols)]
|
22 |
return raw_data, df
|
23 |
|
24 |
|
|
|
25 |
def get_evaluation_queue_df(save_path: str, cols: list) -> list[pd.DataFrame]:
|
26 |
"""Creates the different dataframes for the evaluation queues requestes"""
|
27 |
entries = [entry for entry in os.listdir(save_path) if not entry.startswith(".")]
|
|
|
17 |
df = df.sort_values(by=[AutoEvalColumn.average.name], ascending=False)
|
18 |
df = df[cols].round(decimals=2)
|
19 |
|
20 |
+
# Apply the transformation for MCC values
|
21 |
+
mcc_tasks = ["German", "Australian", "LendingClub", "ccf", "ccfraud", "polish", "taiwan", "portoseguro", "travelinsurance"]
|
22 |
+
for task in mcc_tasks:
|
23 |
+
if task in df.columns:
|
24 |
+
df[task] = (df[task] + 100) / 2.0
|
25 |
+
|
26 |
+
# Filter out if any of the benchmarks have not been produced
|
27 |
df = df[has_no_nan_values(df, benchmark_cols)]
|
28 |
return raw_data, df
|
29 |
|
30 |
|
31 |
+
|
32 |
def get_evaluation_queue_df(save_path: str, cols: list) -> list[pd.DataFrame]:
|
33 |
"""Creates the different dataframes for the evaluation queues requestes"""
|
34 |
entries = [entry for entry in os.listdir(save_path) if not entry.startswith(".")]
|