IliaLarchenko commited on
Commit
7c9c7c8
1 Parent(s): 9bfb67d

Improved analytics

Browse files
Files changed (1) hide show
  1. tests/analysis.py +5 -0
tests/analysis.py CHANGED
@@ -69,6 +69,10 @@ def generate_and_display_tables(df):
69
  prefixes = ["problem", "interviewer", "feedback"]
70
  prefix_columns = [col for col in df.columns if any(col.startswith(prefix) for prefix in prefixes)]
71
 
 
 
 
 
72
  # Aggregated scores per stage
73
  grouped_scores = {}
74
  for prefix in prefixes:
@@ -127,6 +131,7 @@ def generate_and_display_tables(df):
127
  pivot4_styled.set_caption("Pivot Table: Agent Model x Stage vs Type")
128
 
129
  tables_dict = {
 
130
  "grouped_scores_styled": grouped_scores_styled,
131
  "grouped_by_type_styled": grouped_by_type_styled,
132
  "grouped_by_interviewer_styled": grouped_by_interviewer_styled,
 
69
  prefixes = ["problem", "interviewer", "feedback"]
70
  prefix_columns = [col for col in df.columns if any(col.startswith(prefix) for prefix in prefixes)]
71
 
72
+ criteria_summary_df = pd.DataFrame(df[prefix_columns].mean(), columns=["avg score"])
73
+ criteria_summary_df_styled = criteria_summary_df.style.map(highlight_color)
74
+ criteria_summary_df_styled.set_caption("Aggregated Scores per Criteria")
75
+
76
  # Aggregated scores per stage
77
  grouped_scores = {}
78
  for prefix in prefixes:
 
131
  pivot4_styled.set_caption("Pivot Table: Agent Model x Stage vs Type")
132
 
133
  tables_dict = {
134
+ "criteria_summary_df_styled": criteria_summary_df_styled,
135
  "grouped_scores_styled": grouped_scores_styled,
136
  "grouped_by_type_styled": grouped_by_type_styled,
137
  "grouped_by_interviewer_styled": grouped_by_interviewer_styled,