victormiller commited on
Commit
0cbd844
1 Parent(s): d6210aa

Update results.py

Browse files
Files changed (1) hide show
  1. results.py +24 -33
results.py CHANGED
@@ -157,44 +157,35 @@ fig_loss.update_layout(
157
  lm_loss_graph = fig_loss
158
 
159
 
160
- #Perplexity Across Different Buckets (global)
161
- # The data you provided
162
- DATA = [
163
- ["2014", [["1-1", "2-5", "6-10", "11-100", "101-1000", "1001-30000000"], [17.410227605477868, 16.11176217183986, 15.632757662414805, 15.446116676532212, 16.716943171826703, 18.156821563322765]]],
164
- ["2015", [["1-1", "2-5", "6-10", "11-100", "101-1000", "1001-30000000"], [17.446573602753478, 16.14852530113782, 15.627408549576069, 15.0055028132117, 15.565430373421485, 17.314701050452452]]],
165
- ["2016", [["1-1", "2-5", "6-10", "11-100", "101-1000", "1001-30000000"], [17.307221780905284, 16.297702171159543, 15.948641884223639, 14.799690714225637, 14.935989931859659, 16.09585768919658]]],
166
- ["2017", [["1-1", "2-5", "6-10", "11-100", "101-1000", "1001-30000000"], [17.338525603992114, 15.960924352297502, 15.912187993988933, 14.822102470001267, 14.778913482337416, 15.428145290012955]]],
167
- ["2018", [["1-1", "2-5", "6-10", "11-100", "101-1000", "1001-30000000"], [17.08551151136689, 16.187802102106698, 14.935072408852303, 14.832038213200583, 14.508674264491997, 14.800605964649103]]],
168
- ["2019", [["1-1", "2-5", "6-10", "11-100", "101-1000", "1001-30000000"], [16.818363305107052, 16.474269837858706, 14.944741674400241, 14.568394784374943, 14.690158822673334, 15.990949424635108]]],
169
- ["2020", [["1-1", "2-5", "6-10", "11-100", "101-1000", "1001-30000000"], [16.98821894111693, 15.936494557783181, 14.79960386342691, 14.435682562274105, 14.58651834886038, 15.869365567783806]]],
170
- ["2021", [["1-1", "2-5", "6-10", "11-100", "101-1000", "1001-30000000"], [17.125795647512877, 15.780419457145868, 14.631430892394002, 14.276477514399625, 14.337146941773641, 15.872474774329305]]],
171
- ["2022", [["1-1", "2-5", "6-10", "11-100", "101-1000", "1001-30000000"], [16.573462144306383, 15.283018703313582, 14.378277745163881, 14.0611924390084, 13.9886330091318, 15.769421394877273]]],
172
- ["2023", [["1-1", "2-5", "6-10", "11-100", "101-1000", "1001-30000000"], [15.4293630385597, 14.608379914730168, 14.118271697056592, 13.880215644749589, 13.767106666731275, 15.05749135510839]]]
173
- ]
174
-
175
- # Extract ranges (buckets) and years
176
- ranges = DATA[0][1][0]
177
- years = [year_data[0] for year_data in DATA]
178
- all_values = [year_data[1][1] for year_data in DATA]
179
 
180
- # Create the figure
181
- fig = go.Figure()
182
 
183
- # Add a trace for each year
184
- for i, year in enumerate(years):
185
- values = all_values[i]
186
- fig.add_trace(go.Scatter(x=ranges, y=values, mode='lines+markers', name=year))
187
 
188
- # Update layout
189
- fig.update_layout(
190
- title="Perplexity Versus Buckets for Different Years",
191
- xaxis_title="Buckets",
192
- yaxis_title="Perplexity",
193
- legend_title="Years",
194
- hovermode="x unified"
 
 
 
 
195
  )
196
 
197
- Perplexity_Across_Different_Buckets_global_graph = fig
198
 
199
  ##graph 2
200
 
 
157
  lm_loss_graph = fig_loss
158
 
159
 
160
+ data = {
161
+ "1-1": [17.410227605477868, 17.446573602753478,17.307221780905284,17.338525603992114,17.08551151136689,16.818363305107052,16.98821894111693, 17.125795647512877,16.573462144306383, 15.4293630385597],
162
+ "2-5": [16.11176217183986,16.14852530113782,16.297702171159543,15.960924352297502,16.187802102106698,16.474269837858706,15.936494557783181, 15.780419457145868,15.283018703313582, 14.608379914730168],
163
+ "6-10": [15.632757662414805,15.627408549576069,15.948641884223639,15.912187993988933,14.935072408852303,14.944741674400241,14.79960386342691,14.631430892394002, 14.378277745163881,14.118271697056592],
164
+ "11-100": [15.446116676532212,15.0055028132117,14.799690714225637,14.822102470001267,14.832038213200583,14.568394784374943,14.435682562274105,14.276477514399625, 14.0611924390084,13.880215644749589],
165
+ "101-1000": [16.716943171826703,15.565430373421485,14.935989931859659,14.778913482337416,14.508674264491997,14.690158822673334,14.58651834886038,14.337146941773641,13.9886330091318,13.767106666731275 ],
166
+ "1001-30000000": [18.156821563322765,17.314701050452452,16.09585768919658,15.428145290012955, 14.800605964649103, 15.990949424635108,15.869365567783806,15.872474774329305, 15.769421394877273, 15.05749135510839],
167
+ }
 
 
 
 
 
 
 
 
 
 
 
168
 
169
+ # Years for the x-axis
170
+ years = ["2014", "2015", "2016", "2017", "2018", "2019", "2020", "2021", "2022", "2023"]
171
 
172
+ # Create a plotly figure
173
+ fig11 = go.Figure()
 
 
174
 
175
+ # Add a trace for each bucket
176
+ for bucket, values in data.items():
177
+ fig11.add_trace(go.Scatter(x=years, y=values, mode='lines', name=bucket))
178
+
179
+ # Update layout for better presentation
180
+ fig11.update_layout(
181
+ title='Perplexity Versus Buckets for Different Years',
182
+ xaxis_title='Year',
183
+ yaxis_title='Perplexity',
184
+ xaxis_tickangle=-45,
185
+ legend_title="Buckets",
186
  )
187
 
188
+ Perplexity_Across_Different_Buckets_global_graph = fig11
189
 
190
  ##graph 2
191