victormiller commited on
Commit
12aa2bb
1 Parent(s): 5d4fe34

Update results.py

Browse files
Files changed (1) hide show
  1. results.py +46 -27
results.py CHANGED
@@ -422,50 +422,69 @@ llama_graph2 = fig
422
  #llama graph 4
423
 
424
  # Data for different buckets and years
 
 
 
425
  data = {
426
- "1-1": {
427
- "years": ["2014", "2015", "2016", "2017", "2018", "2019", "2020", "2021", "2022", "2023"],
428
- "perplexities": [10.036774097041135, 9.46310273785878, 9.41413706166537, 9.50318602661455, 9.007669062339426, 8.388255660116407, 10.112246017864624, 10.239269162661959, 9.931951075969451, 8.646614152066428]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
429
  },
430
- "2-5": {
431
- "years": ["2014", "2015", "2016", "2017", "2018", "2019", "2020", "2021", "2022", "2023"],
432
- "perplexities": [9.306693996275795, 8.763464863196129, 8.645126825996691, 9.473904977192573, 10.95829859145081, 10.676105294328789, 10.255251179892559, 9.54987953569235, 9.12737570591033, 8.806922449908505]
433
  },
434
- "6-10": {
435
- "years": ["2014", "2015", "2016", "2017", "2018", "2019", "2020", "2021", "2022", "2023"],
436
- "perplexities": [9.442327622499175, 9.075851726027564, 9.527148465147846, 9.755998086072951, 10.128151243953157, 9.728353939624842, 9.233548505479437, 9.067380903629866, 8.995868137602248, 8.816629232137835]
437
  },
438
- "11-100": {
439
- "years": ["2014", "2015", "2016", "2017", "2018", "2019", "2020", "2021", "2022", "2023"],
440
- "perplexities": [9.015408185880002, 8.868392446242012, 9.120345162203675, 8.968012141869462, 9.451949410987668, 9.381837094065533, 9.25131862646364, 9.014261939731549, 9.00805668763514, 8.995152677487027]
441
  },
442
- "101-1000": {
443
- "years": ["2014", "2015", "2016", "2017", "2018", "2019", "2020", "2021", "2022", "2023"],
444
- "perplexities": [9.94583162297666, 9.113560631617027, 8.9228845723255, 8.895860780054043, 8.863879736723902, 8.401723232809463, 8.458532176757009, 8.14345667720481, 7.882044010499616, 7.737747701620713]
445
  },
446
- "1001-30000000": {
447
- "years": ["2014", "2015", "2016", "2017", "2018", "2019", "2020", "2021", "2022", "2023"],
448
- "perplexities": [9.141712571508352, 8.037411460181893, 9.14052983061081, 8.757970647106037, 8.440366034517687, 7.5705604983353325, 7.4808205167223525, 7.312019290288715, 7.538858258386088, 6.77703951001925]
449
  }
450
  }
451
 
452
  # Create figure
453
- fig_4 = go.Figure()
454
 
455
- # Add traces for each bucket
456
- for bucket, bucket_data in data.items():
457
- fig_4.add_trace(go.Scatter(x=bucket_data["years"], y=bucket_data["perplexities"], mode='lines+markers', name=bucket))
458
 
459
  # Update layout
460
- fig_4.update_layout(
461
- title="Perplexity Across Different Years for Various Buckets (Global)",
462
- xaxis_title="Year",
463
  yaxis_title="Average Perplexity",
464
- legend_title="Bucket (Duplicate Count Range)"
465
  )
466
 
467
  # Show the figure
468
- llama_graph4 = fig_4
469
 
470
  ##llama graph 5
471
 
 
422
  #llama graph 4
423
 
424
  # Data for different buckets and years
425
+ import plotly.graph_objects as go
426
+
427
+ # Data for different years and buckets
428
  data = {
429
+ "2014": {
430
+ "buckets": ["1-1", "2-5", "6-10", "11-100", "101-1000", "1001-30000000"],
431
+ "perplexities": [9.276942939297756, 8.69938211424056, 8.158271167692497, 8.367670702299348, 6.583755343348351, 7.497674909399879]
432
+ },
433
+ "2015": {
434
+ "buckets": ["1-1", "2-5", "6-10", "11-100", "101-1000", "1001-30000000"],
435
+ "perplexities": [9.103981560121444, 8.198551019737206, 8.17752561770772, 8.233928498586414, 6.517481691960036, 7.3736492145399355]
436
+ },
437
+ "2016": {
438
+ "buckets": ["1-1", "2-5", "6-10", "11-100", "101-1000", "1001-30000000"],
439
+ "perplexities": [9.023271012270133, 8.067050538323626, 8.150103850870096, 8.232721560484496, 6.3749350052179015, 7.350697996200808]
440
+ },
441
+ "2017": {
442
+ "buckets": ["1-1", "2-5", "6-10", "11-100", "101-1000", "1001-30000000"],
443
+ "perplexities": [9.129487810210167, 8.290815319993621, 7.878257519772607, 7.98292071692709, 6.524893452272168, 6.918924770013169]
444
+ },
445
+ "2018": {
446
+ "buckets": ["1-1", "2-5", "6-10", "11-100", "101-1000", "1001-30000000"],
447
+ "perplexities": [9.213411471804902, 7.89026459259236, 7.403516159589743, 7.556076611087452, 6.6509342133282745, 6.493818412135467]
448
  },
449
+ "2019": {
450
+ "buckets": ["1-1", "2-5", "6-10", "11-100", "101-1000", "1001-30000000"],
451
+ "perplexities": [8.96407327327958, 7.628975687395983, 7.036189728869401, 6.6349379440939895, 6.446837262269017, 6.086615106309735]
452
  },
453
+ "2020": {
454
+ "buckets": ["1-1", "2-5", "6-10", "11-100", "101-1000", "1001-30000000"],
455
+ "perplexities": [9.137673180826452, 7.794611238323424, 7.059198583303955, 6.82070782491814, 6.64418110544852, 6.271177318179787]
456
  },
457
+ "2021": {
458
+ "buckets": ["1-1", "2-5", "6-10", "11-100", "101-1000", "1001-30000000"],
459
+ "perplexities": [9.178752781806578, 7.70543845537127, 6.698443323550492, 6.472409310902069, 7.307749809853384, 6.782598533191676]
460
  },
461
+ "2022": {
462
+ "buckets": ["1-1", "2-5", "6-10", "11-100", "101-1000", "1001-30000000"],
463
+ "perplexities": [9.096031774523855, 7.652072280274248, 6.615135590934534, 6.239500427643811, 6.787412545253696, 6.99638904682498]
464
  },
465
+ "2023": {
466
+ "buckets": ["1-1", "2-5", "6-10", "11-100", "101-1000", "1001-30000000"],
467
+ "perplexities": [8.728460642325789, 7.561677894180029, 6.194391269071906, 5.775947387872692, 6.054439209079063, 5.3384410032299]
468
  }
469
  }
470
 
471
  # Create figure
472
+ fig = go.Figure()
473
 
474
+ # Add traces for each year
475
+ for year, year_data in data.items():
476
+ fig.add_trace(go.Scatter(x=year_data["buckets"], y=year_data["perplexities"], mode='lines+markers', name=year))
477
 
478
  # Update layout
479
+ fig.update_layout(
480
+ title="Perplexity Across Different Buckets (Local)",
481
+ xaxis_title="Bucket (Duplicate Count Range)",
482
  yaxis_title="Average Perplexity",
483
+ legend_title="Year"
484
  )
485
 
486
  # Show the figure
487
+ llama_graph4 = fig
488
 
489
  ##llama graph 5
490