Register
Login
Resources
Docs Blog Datasets Glossary Case Studies Tutorials & Webinars
Product
Data Engine LLMs Platform Enterprise
Pricing Explore
Connect to our Discord channel

create_interpretation_chart_correct.py 3.9 KB

You have to be logged in to leave a comment. Sign In
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
  1. #!/usr/bin/env python3
  2. """
  3. Create a CORRECT political interpretations chart
  4. Shows how the SAME empirical finding gets different framings/interpretations
  5. """
  6. import matplotlib.pyplot as plt
  7. import numpy as np
  8. def create_correct_political_interpretation_chart():
  9. """Create a chart showing different interpretations of the same data"""
  10. fig, ax = plt.subplots(1, 1, figsize=(14, 10))
  11. # The key insight: SAME data, DIFFERENT interpretations
  12. empirical_finding = "+16.8 percentage points increase in 'Unknown' selection"
  13. # Different ways groups interpret this SAME finding
  14. interpretations = [
  15. "Conservative:\n'Woke overcaution'\n'Refuses obvious patterns'",
  16. "Technical:\n'Better calibration'\n'Improved uncertainty quantification'",
  17. "Progressive:\n'Bias reduction'\n'Reduced harmful stereotyping'",
  18. "Safety:\n'Harm prevention'\n'Decreased assumption making'"
  19. ]
  20. colors = ['#E63946', '#2E86AB', '#06D6A0', '#F18F01']
  21. sentiment_labels = ['😠 Negative', '🔬 Neutral', '✊ Positive', '🛡️ Positive']
  22. # Create a visualization that emphasizes INTERPRETATION, not measurement
  23. y_pos = np.arange(len(interpretations))
  24. # Instead of bars showing the same number, create interpretation boxes
  25. for i, (interp, color, sentiment) in enumerate(zip(interpretations, colors, sentiment_labels)):
  26. # Create boxes to represent different interpretations
  27. rect = plt.Rectangle((0, i-0.4), 10, 0.8, facecolor=color, alpha=0.8, edgecolor='black', linewidth=2)
  28. ax.add_patch(rect)
  29. # Add interpretation text
  30. ax.text(5, i, interp, ha='center', va='center', fontweight='bold',
  31. fontsize=11, color='white')
  32. # Add sentiment indicator
  33. ax.text(10.5, i, sentiment, ha='left', va='center', fontweight='bold', fontsize=10)
  34. # Central emphasis on the SAME empirical finding
  35. ax.text(5, len(interpretations), 'THE SAME EMPIRICAL FINDING:',
  36. ha='center', va='bottom', fontweight='bold', fontsize=14, color='black')
  37. ax.text(5, len(interpretations) + 0.3, '+16.8% increase in "Unknown" selection',
  38. ha='center', va='bottom', fontweight='bold', fontsize=12, color='red',
  39. bbox=dict(boxstyle="round,pad=0.3", facecolor='yellow', alpha=0.8))
  40. # Arrow pointing down to show this applies to all interpretations
  41. ax.annotate('', xy=(5, len(interpretations) - 0.7), xytext=(5, len(interpretations) - 0.2),
  42. arrowprops=dict(arrowstyle='->', color='red', lw=3))
  43. ax.set_xlim(-1, 12)
  44. ax.set_ylim(-0.8, len(interpretations) + 0.8)
  45. ax.set_yticks([])
  46. ax.set_xticks([])
  47. # Remove spines
  48. for spine in ax.spines.values():
  49. spine.set_visible(False)
  50. ax.set_title('Four Political Lenses, One Data Point\nHow Different Groups Interpret the Same AI Behavioral Change',
  51. fontsize=16, fontweight='bold', pad=30)
  52. # Add explanatory text
  53. ax.text(5, -0.6, 'The exact same empirical finding gets framed differently based on political perspective',
  54. ha='center', va='top', fontsize=12, style='italic',
  55. bbox=dict(boxstyle="round,pad=0.5", facecolor='lightgray', alpha=0.7))
  56. plt.tight_layout()
  57. plt.savefig('/Users/mdangelo/projects/pf2/site/static/img/blog/bbq-bias/political-interpretations-corrected.png',
  58. dpi=300, bbox_inches='tight', facecolor='white')
  59. plt.close()
  60. def main():
  61. print("🎨 Creating CORRECTED political interpretations chart...")
  62. print("🔧 Key fix: Shows how SAME data gets different interpretations, not different measurements")
  63. create_correct_political_interpretation_chart()
  64. print("✅ Corrected chart saved as political-interpretations-corrected.png")
  65. print("📝 Now shows how the SAME +16.8% finding gets different political framings")
  66. if __name__ == "__main__":
  67. main()
Tip!

Press p or to see the previous file or, n or to see the next file

Comments

Loading...