juncliu commited on
Commit
4b38e69
1 Parent(s): 8fab3a5
Files changed (2) hide show
  1. app.py +1 -1
  2. src/utils.py +5 -3
app.py CHANGED
@@ -151,7 +151,7 @@ def init_leaderboard(ori_dataframe, model_info_df):
151
  filter_columns=[
152
  ColumnFilter(ModelInfoColumn.model_type.name, type="checkboxgroup", label="Model types"),
153
  ],
154
- # bool_checkboxgroup_label="Hide models",
155
  interactive=False,
156
  )
157
 
 
151
  filter_columns=[
152
  ColumnFilter(ModelInfoColumn.model_type.name, type="checkboxgroup", label="Model types"),
153
  ],
154
+ # bool_checkboxgroup_label="",
155
  interactive=False,
156
  )
157
 
src/utils.py CHANGED
@@ -46,7 +46,8 @@ def pivot_df(file_name, tab_name):
46
  def rename_metrics(df):
47
  df = df.rename(columns={
48
  'eval_metrics/MAPE[0.5]': 'MAPE',
49
- 'eval_metrics/mean_weighted_sum_quantile_loss': 'CRPS'
 
50
  })
51
  return df
52
 
@@ -66,7 +67,8 @@ def pivot_existed_df(df, tab_name):
66
  df_melted = pd.melt(df, id_vars=[tab_name, 'model'], var_name='metric', value_name='value')
67
  df_melted['metric'] = df_melted['metric'].replace({
68
  'eval_metrics/MAPE[0.5]': 'MAPE',
69
- 'eval_metrics/mean_weighted_sum_quantile_loss': 'CRPS'
 
70
  })
71
  df_pivot = df_melted.pivot_table(index='model', columns=[tab_name, 'metric'], values='value')
72
  df_pivot.columns = [f'{tab_name} ({metric})' for tab_name, metric in df_pivot.columns]
@@ -144,7 +146,7 @@ def get_grouped_dfs(root_dir='results', ds_properties='results/dataset_propertie
144
  METRIC_CHOICES = ["eval_metrics/MAPE[0.5]", "eval_metrics/mean_weighted_sum_quantile_loss", "rank"]
145
 
146
  grouped_results_overall = df.groupby(['model'])[METRIC_CHOICES].mean()
147
-
148
  # grouped_results.to_csv(f'artefacts/grouped_results_by_model.csv')
149
  grouped_dfs = {}
150
  for col_name in ["domain", 'term_length', 'frequency', 'univariate']:
 
46
  def rename_metrics(df):
47
  df = df.rename(columns={
48
  'eval_metrics/MAPE[0.5]': 'MAPE',
49
+ 'eval_metrics/mean_weighted_sum_quantile_loss': 'CRPS',
50
+ 'rank': 'Rank'
51
  })
52
  return df
53
 
 
67
  df_melted = pd.melt(df, id_vars=[tab_name, 'model'], var_name='metric', value_name='value')
68
  df_melted['metric'] = df_melted['metric'].replace({
69
  'eval_metrics/MAPE[0.5]': 'MAPE',
70
+ 'eval_metrics/mean_weighted_sum_quantile_loss': 'CRPS',
71
+ 'rank': 'Rank',
72
  })
73
  df_pivot = df_melted.pivot_table(index='model', columns=[tab_name, 'metric'], values='value')
74
  df_pivot.columns = [f'{tab_name} ({metric})' for tab_name, metric in df_pivot.columns]
 
146
  METRIC_CHOICES = ["eval_metrics/MAPE[0.5]", "eval_metrics/mean_weighted_sum_quantile_loss", "rank"]
147
 
148
  grouped_results_overall = df.groupby(['model'])[METRIC_CHOICES].mean()
149
+ # grouped_results_overall = grouped_results_overall.rename(columns={'model':'Model'})
150
  # grouped_results.to_csv(f'artefacts/grouped_results_by_model.csv')
151
  grouped_dfs = {}
152
  for col_name in ["domain", 'term_length', 'frequency', 'univariate']: