text: import numpy as np
  from skimage.measure import shannon_entropy
  
  cifar10_names = [
      "airplane", 
      "automobile", 
      "bird",
      "cat", 
      "deer", 
      "dog", 
      "frog", 
      "horse", 
      "ship", 
      "truck",
  ]
  # cifar10_labels = []
  # cifar10_labels.append([1.2977, -0.29922, 0.66154, -0.20133, -0.02502, 0.28644, -1.0811, -0.13045, 0.64917, -0.33634, 0.53352, 0.32792, -0.43206, 1.4613, 0.022957, -0.26019, -1.1061, 1.077, -0.99877, -1.3468, 0.39016, 0.43799, -1.0403, -0.36612, 0.39231, -1.3089, -0.82404, 0.63095, 1.2513, 0.10211, 1.2735, -0.0050163, -0.39469, 0.36387, 0.65099, -0.21433, 0.52291, -0.079013, -0.14676, 0.89248, -0.31447, 0.090903, 0.78216, -0.10842, -0.3186, 0.16068, -0.20168, -0.095033, -0.010109, 0.19048])
  # cifar10_labels.append([-0.41195, 0.069058, 0.26701, 0.41424, -0.91901, 0.63319, -0.89194, -0.53483, 0.19187, -0.038827, 1.1475, -0.1396, -0.66392, -0.19639, 0.30304, -0.06703, -0.95611, 1.6306, 0.17545, -1.6013, 1.2995, -1.0079, -1.7455, -0.00058892, -0.021532, -0.97641, -0.93735, 0.040884, 0.31757, 0.55358, 1.5822, 0.14179, 0.37018, 0.39469, 0.47537, -0.53013, -0.043661, 0.42126, 0.29403, 0.80253, -0.61572, -0.76155, 0.9184, -0.72823, 0.59806, -0.16884, -0.59675, 0.16543, 0.89073, -0.060983])
  # cifar10_labels.append([0.78675, 0.079368, -0.76597, 0.1931, 0.55014, 0.26493, -0.75841, -0.8818, 1.6468, -0.54381, 0.33519, 0.44399, 1.089, 0.27044, 0.74471, 0.2487, 0.2491, -0.28966, -1.4556, 0.35605, -1.1725, -0.49858, 0.35345, -0.1418, 0.71734, -1.1416, -0.038701, 0.27515, -0.017704, -0.44013, 1.9597, -0.064666, 0.47177, -0.03, -0.31617, 0.26984, 0.56195, -0.27882, -0.36358, -0.21923, -0.75046, 0.31817, 0.29354, 0.25109, 1.6111, 0.7134, -0.15243, -0.25362, 0.26419, 0.15875])
  # cifar10_labels.append([0.45281, -0.50108, -0.53714, -0.015697, 0.22191, 0.54602, -0.67301, -0.6891, 0.63493, -0.19726, 0.33685, 0.7735, 0.90094, 0.38488, 0.38367, 0.2657, -0.08057, 0.61089, -1.2894, -0.22313, -0.61578, 0.21697, 0.35614, 0.44499, 0.60885, -1.1633, -1.1579, 0.36118, 0.10466, -0.78325, 1.4352, 0.18629, -0.26112, 0.83275, -0.23123, 0.32481, 0.14485, -0.44552, 0.33497, -0.95946, -0.097479, 0.48138, -0.43352, 0.69455, 0.91043, -0.28173, 0.41637, -1.2609, 0.71278, 0.23782])
  # cifar10_labels.append([-0.0014181, -0.012513, -0.11606, -0.32099, 0.30832, 0.28235, -1.3521, -1.8643, 1.1219, -0.83093, -0.16311, -0.025823, 1.0296, -0.46624, 0.08404, 1.2953, 1.5536, 0.18442, -1.6419, 0.53065, -1.1949, -0.90213, 1.0302, 0.54902, 0.10129, -0.83007, -0.54873, 0.64926, 0.3829, -1.1255, 0.68471, 0.47026, -0.39548, 0.26924, 0.76423, 0.30521, -0.075649, -0.48568, -0.18858, 0.70855, -1.3426, 0.69116, -0.50315, 0.93529, 1.2236, -0.88088, 0.36148, -0.8275, 0.9807, -0.49068])
  # cifar10_labels.append([0.11008, -0.38781, -0.57615, -0.27714, 0.70521, 0.53994, -1.0786, -0.40146, 1.1504, -0.5678, 0.0038977, 0.52878, 0.64561, 0.47262, 0.48549, -0.18407, 0.1801, 0.91397, -1.1979, -0.5778, -0.37985, 0.33606, 0.772, 0.75555, 0.45506, -1.7671, -1.0503, 0.42566, 0.41893, -0.68327, 1.5673, 0.27685, -0.61708, 0.64638, -0.076996, 0.37118, 0.1308, -0.45137, 0.25398, -0.74392, -0.086199, 0.24068, -0.64819, 0.83549, 1.2502, -0.51379, 0.04224, -0.88118, 0.7158, 0.38519])
  # cifar10_labels.append([0.61038, -0.20757, -0.71951, 0.89304, 0.32482, 0.76564, 0.1814, -0.33086, 0.79173, -0.31664, 0.011143, 0.45412, 1.5992, 0.013494, -0.093646, 0.19245, 0.251, 1.1277, -1.0897, -0.42909, -1.1327, -0.90465, 0.5617, -0.058464, 1.0007, -0.39017, -0.41665, 0.73721, -0.53824, -0.95993, 0.67929, -0.59053, 0.13408, 0.54273, -0.36615, 0.014978, -0.2496, -0.81088, 0.078905, -0.97552, -0.66394, -0.18508, -0.87174, 0.30782, 1.2839, -0.14884, 0.62178, -1.509, 0.14582, -0.31682])
  # cifar10_labels.append([-0.20454, 0.23321, -0.59158, -0.29205, 0.29391, 0.31169, -0.94937, 0.055974, 1.0031, -1.0761, -0.0094648, 0.18381, -0.048405, -0.35717, 0.26004, -0.41028, 0.51489, 1.2009, -1.6136, -1.1003, -0.23455, -0.81654, -0.15103, 0.37068, 0.477, -1.7027, -1.2183, 0.038898, 0.23327, 0.028245, 1.6588, 0.26703, -0.29938, 0.99149, 0.34263, 0.15477, 0.028372, 0.56276, -0.62823, -0.67923, -0.163, -0.49922, -0.8599, 0.85469, 0.75059, -1.0399, -0.11033, -1.4237, 0.65984, -0.3198])
  # cifar10_labels.append([1.5213, 0.10522, 0.38162, -0.50801, 0.032423, -0.13484, -1.2474, 0.79813, 0.84691, -1.101, 0.88743, 1.3749, 0.42928, 0.65717, -0.2636, -0.41759, -0.48846, 0.91061, -1.7158, -0.438, 0.78395, 0.19636, -0.40657, -0.53971, 0.82442, -1.7434, 0.14285, 0.28037, 1.1688, 0.16897, 2.2271, -0.58273, -0.45723, 0.62814, 0.54441, 0.28462, 0.44485, -0.55343, -0.36493, -0.016425, 0.40876, -0.87148, 1.5513, -0.80704, -0.10036, -0.28461, -0.33216, -0.50609, 0.48272, -0.66198])
  # cifar10_labels.append([0.35016, -0.36192, 1.505, -0.070263, 0.32708, 0.48106, -1.4825, 0.07962, 0.83452, -0.72912, 0.19233, -0.90769, -0.89611, 0.33796, 0.42153, -0.47797, -0.47473, 1.6142, -0.5358, -1.6758, 0.64926, 0.074053, -0.66378, 0.66352, -0.11525, -1.46, -0.31867, 0.99803, 1.636, -0.11678, 1.8673, -0.19582, -0.50549, 0.82963, 1.3381, 0.33233, 0.24957, -0.37286, 0.2777, 0.88405, -0.29343, -0.0033666, 0.27167, -1.1805, 0.53095, -0.31678, -0.3141, -0.31516, 0.96377, -0.55119])
  
  
  # cifar10_labels = np.asarray(cifar10_labels)
  # np.save('./cifar10_glove.npy', cifar10_labels.astype(np.float32))
  
  num_classes=10
  files = [
      f"cifar{num_classes}_accents_speechamerican.npy",
      f"cifar{num_classes}_accents_speechaustralian.npy",
      f"cifar{num_classes}_accents_speechbritish.npy",
      f"cifar{num_classes}_accents_speechnewzealand.npy",
      f"cifar{num_classes}_accents_speechsouthafrican.npy",
  ]
  
  for file in files:
      print(file)
      cifar10_labels = np.load("/Users/michaelgao/Documents/GitHub/label_representations/labels/label_files/" + file)
  
      entropy_dict = {}
      entropy_arr = []
      for i in range(10):
          value = shannon_entropy(cifar10_labels[i])
          entropy_dict[cifar10_names[i]] = value
          entropy_arr.append(value)
  
      entropy_arr = np.asarray(entropy_arr)
      print('mean entropy: ', np.mean(entropy_arr))
      print('std entropy: ', np.std(entropy_arr))
      print()
  