{
"cells": [
{
"cell_type": "code",
"execution_count": 95,
"id": "3d93276e-d83e-48b7-95be-aaaa89244ef9",
"metadata": {},
"outputs": [],
"source": [
"import numpy as np\n",
"import pandas as pd\n",
"import scipy\n",
"\n",
"import json\n",
"import re\n",
"from itertools import chain\n",
"from collections import Counter"
]
},
{
"cell_type": "code",
"execution_count": 156,
"id": "f57c50ca-3581-4412-a160-774f998ce9df",
"metadata": {},
"outputs": [],
"source": [
"with open(\"./id_all_blip_clusters_12.json\") as f:\n",
" d_12 = json.load(f)\n",
"\n",
"with open(\"./id_all_blip_clusters_24.json\") as f:\n",
" d_24 = json.load(f)\n",
"\n",
"with open(\"./id_all_blip_clusters_48.json\") as f:\n",
" d_48 = json.load(f)"
]
},
{
"cell_type": "code",
"execution_count": 158,
"id": "50727b12-9dcb-4f31-b914-801bcd721949",
"metadata": {},
"outputs": [],
"source": [
"def reduce_full_to_ethnicity_model(d):\n",
" c = Counter()\n",
" for k,v in d['labels_full']:\n",
" k_without_gender = re.split(\"woman|man|person|non-binary\",k)\n",
" k_without_gender = ''.join(k_without_gender)\n",
" k_without_gender = k_without_gender.strip().replace(\" \", \" \")\n",
" c[k_without_gender] = v\n",
" return [[k,v] for k,v in c.items()]"
]
},
{
"cell_type": "code",
"execution_count": 142,
"id": "63830bef-085f-4847-b51a-b4157351a1a5",
"metadata": {},
"outputs": [],
"source": [
"def reduce_full_to_gender_model(d):\n",
" c = Counter()\n",
" for k,v in d['labels_full']:\n",
" k_without_ethnicity = re.split(\"(woman|man|person|non-binary)\", k)\n",
" k_without_ethnicity = ''.join(k_without_ethnicity[1:])\n",
" k_without_ethnicity = k_without_ethnicity.strip().replace(\" \", \" \")\n",
" c[k_without_ethnicity] = v\n",
" return [[k,v] for k,v in c.items()]"
]
},
{
"cell_type": "code",
"execution_count": 154,
"id": "7edad0d1-3d6d-406e-87ef-a0a8c185a53f",
"metadata": {},
"outputs": [],
"source": [
"def reduce_full_to_ethnicity_gender(d):\n",
" c = Counter()\n",
" for k,v in d['labels_full']:\n",
" k_without_model = re.split(\"(woman|man|person|non-binary)\", k)\n",
" k_without_model = ''.join(k_without_model[:2])\n",
" k_without_model = k_without_model.strip().replace(\" \", \" \")\n",
" c[k_without_model] = v\n",
" return [[k,v] for k,v in c.items()]"
]
},
{
"cell_type": "code",
"execution_count": 159,
"id": "da978f3b-8f94-4d1b-bae2-f3bb4e9986b4",
"metadata": {},
"outputs": [],
"source": [
"for cluster_dicts in [d_12, d_24, d_48]:\n",
" for d in cluster_dicts:\n",
" d[\"labels_ethnicity_model\"] = reduce_full_to_ethnicity_model(d)\n",
" d[\"labels_gender_model\"] = reduce_full_to_gender_model(d)\n",
" d[\"labels_ethnicity_gender\"] = reduce_full_to_ethnicity_gender(d)"
]
},
{
"cell_type": "code",
"execution_count": 162,
"id": "dcab249b-8c66-464f-a41c-a9ae5ab3ad71",
"metadata": {},
"outputs": [],
"source": [
"# p(cluster | ethnicity, model) DONE\n",
"# p(cluster | gender, model) DONE\n",
"# p(cluster | gender, ethnicity, model) DONE\n",
"# p(cluster | ethnicity) DONE\n",
"# p(cluster | gender) DONE\n",
"# p(cluster | gender, ethnicity) DONE\n",
"# p(cluster | model) ADDED, DONE"
]
},
{
"cell_type": "markdown",
"id": "aff706c7-acb0-460a-bc09-4ce673f8a641",
"metadata": {},
"source": [
"# Ethnicities"
]
},
{
"cell_type": "code",
"execution_count": 74,
"id": "84e4a4d4-d79b-4666-a7bf-a7532f143019",
"metadata": {},
"outputs": [],
"source": [
"entropies = []\n",
"random_entropies = []\n",
"for cluster_dicts in [d_12, d_24, d_48]:\n",
" entropy = dict()\n",
" random_entropy = dict()\n",
" n_clusters = len(cluster_dicts)\n",
" all_ethnicities = [list(dict(d['labels_ethnicity']).keys()) for d in cluster_dicts]\n",
" all_ethnicities = list(set(chain(*all_ethnicities)))\n",
" for ethnicity in all_ethnicities:\n",
" h = []\n",
" for i in cluster_dicts:\n",
" h.append(dict(i['labels_ethnicity']).get(ethnicity, 0))\n",
" h = np.array(h)\n",
" r = np.ones_like(h)\n",
" entropy[ethnicity] = scipy.stats.entropy(h / sum(h), base=2)\n",
" random_entropy[ethnicity] = scipy.stats.entropy(r, base=2)\n",
" entropies.append(entropy)\n",
" random_entropies.append(random_entropy)"
]
},
{
"cell_type": "code",
"execution_count": 79,
"id": "0abbdcb0-b06a-4905-8d8e-c3340f8b7e05",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"5.584962500721156"
]
},
"execution_count": 79,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"np.log2(48)"
]
},
{
"cell_type": "code",
"execution_count": 75,
"id": "fd938629-c0bf-48c2-b585-5e6a53b8c52d",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"{'': 5.584962500721156,\n",
" 'Latinx': 5.584962500721156,\n",
" 'African-American': 5.584962500721156,\n",
" 'Hispanic': 5.584962500721156,\n",
" 'Indigenous American': 5.584962500721156,\n",
" 'First Nations': 5.584962500721156,\n",
" 'Black': 5.584962500721156,\n",
" 'Multiracial': 5.584962500721156,\n",
" 'Latino': 5.584962500721156,\n",
" 'Southeast Asian': 5.584962500721156,\n",
" 'American Indian': 5.584962500721156,\n",
" 'South Asian': 5.584962500721156,\n",
" 'Caucasian': 5.584962500721156,\n",
" 'Native American': 5.584962500721156,\n",
" 'East Asian': 5.584962500721156,\n",
" 'Pacific Islander': 5.584962500721156,\n",
" 'White': 5.584962500721156}"
]
},
"execution_count": 75,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"random_entropy"
]
},
{
"cell_type": "code",
"execution_count": 53,
"id": "0bfc516f-53e0-4f41-bd46-7375913840d6",
"metadata": {
"collapsed": true,
"jupyter": {
"outputs_hidden": true
},
"tags": []
},
"outputs": [
{
"data": {
"text/html": [
"\n",
"
\n",
" \n",
" \n",
" | \n",
" entropy | \n",
"
\n",
" \n",
" \n",
" \n",
" Pacific Islander | \n",
" 3.05 | \n",
"
\n",
" \n",
" Latino | \n",
" 2.75 | \n",
"
\n",
" \n",
" Latinx | \n",
" 2.70 | \n",
"
\n",
" \n",
" Hispanic | \n",
" 2.61 | \n",
"
\n",
" \n",
" Multiracial | \n",
" 2.50 | \n",
"
\n",
" \n",
" Southeast Asian | \n",
" 2.42 | \n",
"
\n",
" \n",
" First Nations | \n",
" 2.38 | \n",
"
\n",
" \n",
" Indigenous American | \n",
" 2.19 | \n",
"
\n",
" \n",
" Caucasian | \n",
" 2.08 | \n",
"
\n",
" \n",
" White | \n",
" 2.04 | \n",
"
\n",
" \n",
" Native American | \n",
" 1.91 | \n",
"
\n",
" \n",
" American Indian | \n",
" 1.88 | \n",
"
\n",
" \n",
" | \n",
" 1.69 | \n",
"
\n",
" \n",
" East Asian | \n",
" 1.62 | \n",
"
\n",
" \n",
" Black | \n",
" 1.54 | \n",
"
\n",
" \n",
" African-American | \n",
" 1.49 | \n",
"
\n",
" \n",
" South Asian | \n",
" 1.32 | \n",
"
\n",
" \n",
"
\n"
],
"text/plain": [
""
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/html": [
"\n",
"\n",
" \n",
" \n",
" | \n",
" entropy | \n",
"
\n",
" \n",
" \n",
" \n",
" Pacific Islander | \n",
" 3.68 | \n",
"
\n",
" \n",
" Latino | \n",
" 3.51 | \n",
"
\n",
" \n",
" First Nations | \n",
" 3.25 | \n",
"
\n",
" \n",
" Latinx | \n",
" 3.23 | \n",
"
\n",
" \n",
" Hispanic | \n",
" 3.15 | \n",
"
\n",
" \n",
" Multiracial | \n",
" 3.00 | \n",
"
\n",
" \n",
" Indigenous American | \n",
" 3.00 | \n",
"
\n",
" \n",
" Southeast Asian | \n",
" 2.95 | \n",
"
\n",
" \n",
" Caucasian | \n",
" 2.86 | \n",
"
\n",
" \n",
" White | \n",
" 2.76 | \n",
"
\n",
" \n",
" American Indian | \n",
" 2.70 | \n",
"
\n",
" \n",
" Native American | \n",
" 2.68 | \n",
"
\n",
" \n",
" | \n",
" 2.53 | \n",
"
\n",
" \n",
" Black | \n",
" 2.01 | \n",
"
\n",
" \n",
" African-American | \n",
" 1.82 | \n",
"
\n",
" \n",
" East Asian | \n",
" 1.76 | \n",
"
\n",
" \n",
" South Asian | \n",
" 1.35 | \n",
"
\n",
" \n",
"
\n"
],
"text/plain": [
""
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/html": [
"\n",
"\n",
" \n",
" \n",
" | \n",
" entropy | \n",
"
\n",
" \n",
" \n",
" \n",
" Pacific Islander | \n",
" 4.28 | \n",
"
\n",
" \n",
" Latino | \n",
" 4.26 | \n",
"
\n",
" \n",
" Hispanic | \n",
" 4.17 | \n",
"
\n",
" \n",
" First Nations | \n",
" 4.06 | \n",
"
\n",
" \n",
" Indigenous American | \n",
" 4.00 | \n",
"
\n",
" \n",
" Native American | \n",
" 3.88 | \n",
"
\n",
" \n",
" Latinx | \n",
" 3.88 | \n",
"
\n",
" \n",
" American Indian | \n",
" 3.74 | \n",
"
\n",
" \n",
" Multiracial | \n",
" 3.36 | \n",
"
\n",
" \n",
" Caucasian | \n",
" 3.22 | \n",
"
\n",
" \n",
" White | \n",
" 3.20 | \n",
"
\n",
" \n",
" | \n",
" 3.20 | \n",
"
\n",
" \n",
" Southeast Asian | \n",
" 3.18 | \n",
"
\n",
" \n",
" African-American | \n",
" 2.83 | \n",
"
\n",
" \n",
" Black | \n",
" 2.69 | \n",
"
\n",
" \n",
" East Asian | \n",
" 2.03 | \n",
"
\n",
" \n",
" South Asian | \n",
" 1.95 | \n",
"
\n",
" \n",
"
\n"
],
"text/plain": [
""
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"for d in entropies:\n",
" df = pd.DataFrame(pd.Series(d), columns=[\"entropy\"])\n",
" display(df.sort_values(\"entropy\", ascending=False).style.background_gradient(\n",
" axis=None,\n",
" vmin=0,\n",
" vmax=4,\n",
" cmap=\"YlGnBu\"\n",
").format(precision=2))"
]
},
{
"cell_type": "markdown",
"id": "a2dd2700-3a18-446b-883a-d7efaba9df43",
"metadata": {},
"source": [
"# Ethnicities X Model"
]
},
{
"cell_type": "code",
"execution_count": 128,
"id": "95a27f11-db32-448f-9712-6b6f18457515",
"metadata": {},
"outputs": [],
"source": [
"entropies = []\n",
"random_entropies = []\n",
"for cluster_dicts in [d_12, d_24, d_48]:\n",
" entropy = dict()\n",
" random_entropy = dict()\n",
" n_clusters = len(cluster_dicts)\n",
" all_ethnicities_models = [list(dict(d['labels_ethnicity_model']).keys()) for d in cluster_dicts]\n",
" all_ethnicities_models = list(set(chain(*all_ethnicities_models)))\n",
" for ethnicity_model in all_ethnicities_models:\n",
" h = []\n",
" for i in cluster_dicts:\n",
" h.append(dict(i['labels_ethnicity_model']).get(ethnicity_model, 0))\n",
" h = np.array(h)\n",
" r = np.ones_like(h)\n",
" entropy[ethnicity_model] = scipy.stats.entropy(h / sum(h), base=2)\n",
" entropies.append(entropy)"
]
},
{
"cell_type": "code",
"execution_count": 130,
"id": "6a1f1689-e59b-408b-8886-a42113fb6faa",
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\n",
"\n",
" \n",
" \n",
" | \n",
" entropy | \n",
"
\n",
" \n",
" \n",
" \n",
" Multiracial DallE | \n",
" 2.92 | \n",
"
\n",
" \n",
" Pacific Islander SD_2 | \n",
" 2.78 | \n",
"
\n",
" \n",
" Latinx SD_2 | \n",
" 2.76 | \n",
"
\n",
" \n",
" Southeast Asian DallE | \n",
" 2.75 | \n",
"
\n",
" \n",
" Multiracial SD_14 | \n",
" 2.72 | \n",
"
\n",
" \n",
" Latino SD_2 | \n",
" 2.69 | \n",
"
\n",
" \n",
" Hispanic SD_2 | \n",
" 2.66 | \n",
"
\n",
" \n",
" Latinx DallE | \n",
" 2.63 | \n",
"
\n",
" \n",
" Latino DallE | \n",
" 2.59 | \n",
"
\n",
" \n",
" First Nations DallE | \n",
" 2.57 | \n",
"
\n",
" \n",
" Hispanic SD_14 | \n",
" 2.50 | \n",
"
\n",
" \n",
" Latino SD_14 | \n",
" 2.45 | \n",
"
\n",
" \n",
" Caucasian SD_14 | \n",
" 2.44 | \n",
"
\n",
" \n",
" Southeast Asian SD_14 | \n",
" 2.30 | \n",
"
\n",
" \n",
" Multiracial SD_2 | \n",
" 2.28 | \n",
"
\n",
" \n",
" Pacific Islander DallE | \n",
" 2.27 | \n",
"
\n",
" \n",
" American Indian SD_2 | \n",
" 2.26 | \n",
"
\n",
" \n",
" Latinx SD_14 | \n",
" 2.22 | \n",
"
\n",
" \n",
" Indigenous American DallE | \n",
" 2.17 | \n",
"
\n",
" \n",
" SD_2 | \n",
" 2.16 | \n",
"
\n",
" \n",
" White SD_14 | \n",
" 2.16 | \n",
"
\n",
" \n",
" Native American DallE | \n",
" 2.16 | \n",
"
\n",
" \n",
" Hispanic DallE | \n",
" 2.15 | \n",
"
\n",
" \n",
" Pacific Islander SD_14 | \n",
" 2.13 | \n",
"
\n",
" \n",
" Indigenous American SD_2 | \n",
" 2.10 | \n",
"
\n",
" \n",
" Native American SD_2 | \n",
" 2.07 | \n",
"
\n",
" \n",
" White SD_2 | \n",
" 2.06 | \n",
"
\n",
" \n",
" East Asian DallE | \n",
" 1.99 | \n",
"
\n",
" \n",
" African-American SD_14 | \n",
" 1.96 | \n",
"
\n",
" \n",
" First Nations SD_2 | \n",
" 1.94 | \n",
"
\n",
" \n",
" Caucasian SD_2 | \n",
" 1.91 | \n",
"
\n",
" \n",
" American Indian DallE | \n",
" 1.91 | \n",
"
\n",
" \n",
" Southeast Asian SD_2 | \n",
" 1.88 | \n",
"
\n",
" \n",
" SD_14 | \n",
" 1.87 | \n",
"
\n",
" \n",
" Caucasian DallE | \n",
" 1.79 | \n",
"
\n",
" \n",
" First Nations SD_14 | \n",
" 1.78 | \n",
"
\n",
" \n",
" South Asian DallE | \n",
" 1.73 | \n",
"
\n",
" \n",
" Indigenous American SD_14 | \n",
" 1.66 | \n",
"
\n",
" \n",
" White DallE | \n",
" 1.59 | \n",
"
\n",
" \n",
" African-American DallE | \n",
" 1.58 | \n",
"
\n",
" \n",
" Black DallE | \n",
" 1.55 | \n",
"
\n",
" \n",
" East Asian SD_2 | \n",
" 1.50 | \n",
"
\n",
" \n",
" Black SD_14 | \n",
" 1.36 | \n",
"
\n",
" \n",
" South Asian SD_2 | \n",
" 1.36 | \n",
"
\n",
" \n",
" Black SD_2 | \n",
" 1.23 | \n",
"
\n",
" \n",
" African-American SD_2 | \n",
" 1.00 | \n",
"
\n",
" \n",
" American Indian SD_14 | \n",
" 0.97 | \n",
"
\n",
" \n",
" South Asian SD_14 | \n",
" 0.92 | \n",
"
\n",
" \n",
" DallE | \n",
" 0.87 | \n",
"
\n",
" \n",
" East Asian SD_14 | \n",
" 0.72 | \n",
"
\n",
" \n",
" Native American SD_14 | \n",
" 0.00 | \n",
"
\n",
" \n",
"
\n"
],
"text/plain": [
""
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/html": [
"\n",
"\n",
" \n",
" \n",
" | \n",
" entropy | \n",
"
\n",
" \n",
" \n",
" \n",
" Pacific Islander SD_2 | \n",
" 3.75 | \n",
"
\n",
" \n",
" Multiracial DallE | \n",
" 3.57 | \n",
"
\n",
" \n",
" Southeast Asian DallE | \n",
" 3.36 | \n",
"
\n",
" \n",
" Hispanic SD_14 | \n",
" 3.32 | \n",
"
\n",
" \n",
" Latino DallE | \n",
" 3.27 | \n",
"
\n",
" \n",
" Latino SD_2 | \n",
" 3.21 | \n",
"
\n",
" \n",
" Latinx DallE | \n",
" 3.17 | \n",
"
\n",
" \n",
" Native American SD_2 | \n",
" 3.09 | \n",
"
\n",
" \n",
" Multiracial SD_14 | \n",
" 3.08 | \n",
"
\n",
" \n",
" First Nations DallE | \n",
" 3.06 | \n",
"
\n",
" \n",
" Latinx SD_2 | \n",
" 2.95 | \n",
"
\n",
" \n",
" Native American DallE | \n",
" 2.91 | \n",
"
\n",
" \n",
" American Indian SD_2 | \n",
" 2.91 | \n",
"
\n",
" \n",
" Latino SD_14 | \n",
" 2.91 | \n",
"
\n",
" \n",
" White SD_14 | \n",
" 2.87 | \n",
"
\n",
" \n",
" Caucasian SD_14 | \n",
" 2.84 | \n",
"
\n",
" \n",
" Hispanic SD_2 | \n",
" 2.80 | \n",
"
\n",
" \n",
" SD_2 | \n",
" 2.76 | \n",
"
\n",
" \n",
" Latinx SD_14 | \n",
" 2.73 | \n",
"
\n",
" \n",
" Pacific Islander DallE | \n",
" 2.71 | \n",
"
\n",
" \n",
" Indigenous American SD_2 | \n",
" 2.70 | \n",
"
\n",
" \n",
" Multiracial SD_2 | \n",
" 2.70 | \n",
"
\n",
" \n",
" First Nations SD_14 | \n",
" 2.66 | \n",
"
\n",
" \n",
" Hispanic DallE | \n",
" 2.62 | \n",
"
\n",
" \n",
" First Nations SD_2 | \n",
" 2.61 | \n",
"
\n",
" \n",
" Indigenous American DallE | \n",
" 2.61 | \n",
"
\n",
" \n",
" Southeast Asian SD_14 | \n",
" 2.60 | \n",
"
\n",
" \n",
" Caucasian SD_2 | \n",
" 2.54 | \n",
"
\n",
" \n",
" White SD_2 | \n",
" 2.54 | \n",
"
\n",
" \n",
" American Indian DallE | \n",
" 2.50 | \n",
"
\n",
" \n",
" East Asian DallE | \n",
" 2.45 | \n",
"
\n",
" \n",
" Indigenous American SD_14 | \n",
" 2.45 | \n",
"
\n",
" \n",
" Pacific Islander SD_14 | \n",
" 2.41 | \n",
"
\n",
" \n",
" African-American SD_14 | \n",
" 2.22 | \n",
"
\n",
" \n",
" Southeast Asian SD_2 | \n",
" 2.11 | \n",
"
\n",
" \n",
" Caucasian DallE | \n",
" 2.08 | \n",
"
\n",
" \n",
" Black DallE | \n",
" 2.08 | \n",
"
\n",
" \n",
" White DallE | \n",
" 2.06 | \n",
"
\n",
" \n",
" SD_14 | \n",
" 1.93 | \n",
"
\n",
" \n",
" Black SD_14 | \n",
" 1.83 | \n",
"
\n",
" \n",
" South Asian DallE | \n",
" 1.73 | \n",
"
\n",
" \n",
" Black SD_2 | \n",
" 1.62 | \n",
"
\n",
" \n",
" African-American DallE | \n",
" 1.58 | \n",
"
\n",
" \n",
" American Indian SD_14 | \n",
" 1.58 | \n",
"
\n",
" \n",
" East Asian SD_2 | \n",
" 1.50 | \n",
"
\n",
" \n",
" African-American SD_2 | \n",
" 1.47 | \n",
"
\n",
" \n",
" South Asian SD_2 | \n",
" 1.46 | \n",
"
\n",
" \n",
" DallE | \n",
" 1.28 | \n",
"
\n",
" \n",
" East Asian SD_14 | \n",
" 1.25 | \n",
"
\n",
" \n",
" South Asian SD_14 | \n",
" 0.92 | \n",
"
\n",
" \n",
" Native American SD_14 | \n",
" 0.47 | \n",
"
\n",
" \n",
"
\n"
],
"text/plain": [
""
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/html": [
"\n",
"\n",
" \n",
" \n",
" | \n",
" entropy | \n",
"
\n",
" \n",
" \n",
" \n",
" Multiracial DallE | \n",
" 3.96 | \n",
"
\n",
" \n",
" Pacific Islander SD_2 | \n",
" 3.91 | \n",
"
\n",
" \n",
" Hispanic SD_14 | \n",
" 3.86 | \n",
"
\n",
" \n",
" Native American DallE | \n",
" 3.62 | \n",
"
\n",
" \n",
" Latino SD_2 | \n",
" 3.61 | \n",
"
\n",
" \n",
" First Nations DallE | \n",
" 3.61 | \n",
"
\n",
" \n",
" Pacific Islander DallE | \n",
" 3.54 | \n",
"
\n",
" \n",
" Latinx DallE | \n",
" 3.51 | \n",
"
\n",
" \n",
" Latinx SD_14 | \n",
" 3.46 | \n",
"
\n",
" \n",
" Indigenous American DallE | \n",
" 3.41 | \n",
"
\n",
" \n",
" Southeast Asian DallE | \n",
" 3.35 | \n",
"
\n",
" \n",
" Latino DallE | \n",
" 3.35 | \n",
"
\n",
" \n",
" Pacific Islander SD_14 | \n",
" 3.34 | \n",
"
\n",
" \n",
" Latino SD_14 | \n",
" 3.31 | \n",
"
\n",
" \n",
" Hispanic SD_2 | \n",
" 3.29 | \n",
"
\n",
" \n",
" Native American SD_2 | \n",
" 3.20 | \n",
"
\n",
" \n",
" Multiracial SD_14 | \n",
" 3.18 | \n",
"
\n",
" \n",
" White SD_2 | \n",
" 3.17 | \n",
"
\n",
" \n",
" American Indian SD_2 | \n",
" 3.16 | \n",
"
\n",
" \n",
" Caucasian SD_14 | \n",
" 3.08 | \n",
"
\n",
" \n",
" American Indian DallE | \n",
" 3.06 | \n",
"
\n",
" \n",
" White SD_14 | \n",
" 3.05 | \n",
"
\n",
" \n",
" First Nations SD_14 | \n",
" 3.03 | \n",
"
\n",
" \n",
" Latinx SD_2 | \n",
" 2.99 | \n",
"
\n",
" \n",
" Multiracial SD_2 | \n",
" 2.99 | \n",
"
\n",
" \n",
" Indigenous American SD_14 | \n",
" 2.97 | \n",
"
\n",
" \n",
" Indigenous American SD_2 | \n",
" 2.97 | \n",
"
\n",
" \n",
" SD_2 | \n",
" 2.97 | \n",
"
\n",
" \n",
" SD_14 | \n",
" 2.88 | \n",
"
\n",
" \n",
" Hispanic DallE | \n",
" 2.80 | \n",
"
\n",
" \n",
" Caucasian SD_2 | \n",
" 2.75 | \n",
"
\n",
" \n",
" First Nations SD_2 | \n",
" 2.71 | \n",
"
\n",
" \n",
" African-American SD_14 | \n",
" 2.54 | \n",
"
\n",
" \n",
" American Indian SD_14 | \n",
" 2.50 | \n",
"
\n",
" \n",
" East Asian DallE | \n",
" 2.50 | \n",
"
\n",
" \n",
" African-American DallE | \n",
" 2.50 | \n",
"
\n",
" \n",
" South Asian DallE | \n",
" 2.40 | \n",
"
\n",
" \n",
" White DallE | \n",
" 2.36 | \n",
"
\n",
" \n",
" Southeast Asian SD_14 | \n",
" 2.35 | \n",
"
\n",
" \n",
" Black SD_14 | \n",
" 2.28 | \n",
"
\n",
" \n",
" Black SD_2 | \n",
" 2.26 | \n",
"
\n",
" \n",
" Southeast Asian SD_2 | \n",
" 2.26 | \n",
"
\n",
" \n",
" Black DallE | \n",
" 2.26 | \n",
"
\n",
" \n",
" Caucasian DallE | \n",
" 2.21 | \n",
"
\n",
" \n",
" African-American SD_2 | \n",
" 2.18 | \n",
"
\n",
" \n",
" Native American SD_14 | \n",
" 1.97 | \n",
"
\n",
" \n",
" DallE | \n",
" 1.95 | \n",
"
\n",
" \n",
" East Asian SD_2 | \n",
" 1.92 | \n",
"
\n",
" \n",
" South Asian SD_2 | \n",
" 1.70 | \n",
"
\n",
" \n",
" South Asian SD_14 | \n",
" 1.66 | \n",
"
\n",
" \n",
" East Asian SD_14 | \n",
" 1.66 | \n",
"
\n",
" \n",
"
\n"
],
"text/plain": [
""
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"for d in entropies:\n",
" df = pd.DataFrame(pd.Series(d), columns=[\"entropy\"])\n",
" display(df.sort_values(\"entropy\", ascending=False).style.background_gradient(\n",
" axis=None,\n",
" vmin=0,\n",
" vmax=4,\n",
" cmap=\"YlGnBu\"\n",
").format(precision=2))"
]
},
{
"cell_type": "markdown",
"id": "014b36e8-9a21-4ceb-81b0-ce93a384ddbb",
"metadata": {},
"source": [
"# Genders"
]
},
{
"cell_type": "code",
"execution_count": 58,
"id": "6633a33e-e9a9-48cf-ada7-76f2221b43fe",
"metadata": {},
"outputs": [],
"source": [
"entropies = []\n",
"for cluster_dicts in [d_12, d_24, d_48]:\n",
" entropy = dict()\n",
" n_clusters = len(cluster_dicts)\n",
" all_genders = [list(dict(d['labels_gender']).keys()) for d in cluster_dicts]\n",
" all_genders = list(set(chain(*all_genders)))\n",
" for gender in all_genders:\n",
" h = []\n",
" for i in cluster_dicts:\n",
" h.append(dict(i['labels_gender']).get(gender, 0))\n",
" h = np.array(h)\n",
" entropy[gender] = scipy.stats.entropy(h / sum(h), base=2)\n",
" entropies.append(entropy)"
]
},
{
"cell_type": "code",
"execution_count": 59,
"id": "abedb706-dfca-416f-af6a-c9e59f48215e",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"[{'woman': 2.4810719655716675,\n",
" 'man': 2.7334846800371837,\n",
" 'person': 3.2367086062758728,\n",
" 'non-binary': 2.820571495642662},\n",
" {'woman': 3.175925805050219,\n",
" 'man': 3.6256634564832084,\n",
" 'person': 4.1229292987043635,\n",
" 'non-binary': 3.7329829916387802},\n",
" {'woman': 4.424803401742995,\n",
" 'man': 4.422651789402228,\n",
" 'person': 4.812137497942508,\n",
" 'non-binary': 4.421094043509409}]"
]
},
"execution_count": 59,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"entropies"
]
},
{
"cell_type": "code",
"execution_count": 60,
"id": "d06e10c5-d6f0-412f-bba7-5583796ac98b",
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\n",
"\n",
" \n",
" \n",
" | \n",
" entropy | \n",
"
\n",
" \n",
" \n",
" \n",
" person | \n",
" 3.24 | \n",
"
\n",
" \n",
" non-binary | \n",
" 2.82 | \n",
"
\n",
" \n",
" man | \n",
" 2.73 | \n",
"
\n",
" \n",
" woman | \n",
" 2.48 | \n",
"
\n",
" \n",
"
\n"
],
"text/plain": [
""
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/html": [
"\n",
"\n",
" \n",
" \n",
" | \n",
" entropy | \n",
"
\n",
" \n",
" \n",
" \n",
" person | \n",
" 4.12 | \n",
"
\n",
" \n",
" non-binary | \n",
" 3.73 | \n",
"
\n",
" \n",
" man | \n",
" 3.63 | \n",
"
\n",
" \n",
" woman | \n",
" 3.18 | \n",
"
\n",
" \n",
"
\n"
],
"text/plain": [
""
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/html": [
"\n",
"\n",
" \n",
" \n",
" | \n",
" entropy | \n",
"
\n",
" \n",
" \n",
" \n",
" person | \n",
" 4.81 | \n",
"
\n",
" \n",
" woman | \n",
" 4.42 | \n",
"
\n",
" \n",
" man | \n",
" 4.42 | \n",
"
\n",
" \n",
" non-binary | \n",
" 4.42 | \n",
"
\n",
" \n",
"
\n"
],
"text/plain": [
""
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"for d in entropies:\n",
" df = pd.DataFrame(pd.Series(d), columns=[\"entropy\"])\n",
" display(df.sort_values(\"entropy\", ascending=False).style.background_gradient(\n",
" axis=None,\n",
" vmin=0,\n",
" vmax=4,\n",
" cmap=\"YlGnBu\"\n",
").format(precision=2))"
]
},
{
"cell_type": "markdown",
"id": "600e4ad8-d872-4e79-96d0-a843d232fe2e",
"metadata": {},
"source": [
"# Models"
]
},
{
"cell_type": "code",
"execution_count": 84,
"id": "c63fabe7-dadc-4945-b69f-f81d4a9a7ba6",
"metadata": {},
"outputs": [],
"source": [
"entropies = []\n",
"for cluster_dicts in [d_12, d_24, d_48]:\n",
" entropy = dict()\n",
" n_clusters = len(cluster_dicts)\n",
" all_models = [list(dict(d['labels_model']).keys()) for d in cluster_dicts]\n",
" all_models = list(set(chain(*all_models)))\n",
" for model in all_models:\n",
" h = []\n",
" for i in cluster_dicts:\n",
" h.append(dict(i['labels_model']).get(model, 0))\n",
" h = np.array(h)\n",
" entropy[model] = scipy.stats.entropy(h / sum(h), base=2)\n",
" entropies.append(entropy)"
]
},
{
"cell_type": "code",
"execution_count": 86,
"id": "207c235e-7874-40b2-90e6-ec35bc789d0b",
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\n",
"\n",
" \n",
" \n",
" | \n",
" entropy | \n",
"
\n",
" \n",
" \n",
" \n",
" SD_2 | \n",
" 3.48 | \n",
"
\n",
" \n",
" SD_14 | \n",
" 3.41 | \n",
"
\n",
" \n",
" DallE | \n",
" 3.33 | \n",
"
\n",
" \n",
"
\n"
],
"text/plain": [
""
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/html": [
"\n",
"\n",
" \n",
" \n",
" | \n",
" entropy | \n",
"
\n",
" \n",
" \n",
" \n",
" SD_2 | \n",
" 4.31 | \n",
"
\n",
" \n",
" SD_14 | \n",
" 4.15 | \n",
"
\n",
" \n",
" DallE | \n",
" 4.12 | \n",
"
\n",
" \n",
"
\n"
],
"text/plain": [
""
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/html": [
"\n",
"\n",
" \n",
" \n",
" | \n",
" entropy | \n",
"
\n",
" \n",
" \n",
" \n",
" SD_14 | \n",
" 5.07 | \n",
"
\n",
" \n",
" SD_2 | \n",
" 5.01 | \n",
"
\n",
" \n",
" DallE | \n",
" 4.86 | \n",
"
\n",
" \n",
"
\n"
],
"text/plain": [
""
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"for d in entropies:\n",
" df = pd.DataFrame(pd.Series(d), columns=[\"entropy\"])\n",
" display(df.sort_values(\"entropy\", ascending=False).style.background_gradient(\n",
" axis=None,\n",
" vmin=0,\n",
" vmax=4,\n",
" cmap=\"YlGnBu\"\n",
").format(precision=2))"
]
},
{
"cell_type": "markdown",
"id": "66d9c1b9-9bce-4428-9149-b3782202cea5",
"metadata": {},
"source": [
"# Gender X Model"
]
},
{
"cell_type": "code",
"execution_count": 146,
"id": "db5a4a11-8dbf-4178-b6fb-3ed28d779003",
"metadata": {},
"outputs": [],
"source": [
"entropies = []\n",
"random_entropies = []\n",
"for cluster_dicts in [d_12, d_24, d_48]:\n",
" entropy = dict()\n",
" random_entropy = dict()\n",
" n_clusters = len(cluster_dicts)\n",
" all_genders_models = [list(dict(d['labels_gender_model']).keys()) for d in cluster_dicts]\n",
" all_genders_models = list(set(chain(*all_genders_models)))\n",
" for gender_model in all_genders_models:\n",
" h = []\n",
" for i in cluster_dicts:\n",
" h.append(dict(i['labels_gender_model']).get(gender_model, 0))\n",
" h = np.array(h)\n",
" r = np.ones_like(h)\n",
" entropy[gender_model] = scipy.stats.entropy(h / sum(h), base=2)\n",
" entropies.append(entropy)"
]
},
{
"cell_type": "code",
"execution_count": 147,
"id": "08617661-f71b-4ebd-837c-feae2c7b4bff",
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\n",
"\n",
" \n",
" \n",
" | \n",
" entropy | \n",
"
\n",
" \n",
" \n",
" \n",
" person SD_14 | \n",
" 3.32 | \n",
"
\n",
" \n",
" non-binary DallE | \n",
" 3.24 | \n",
"
\n",
" \n",
" person SD_2 | \n",
" 3.20 | \n",
"
\n",
" \n",
" non-binary SD_14 | \n",
" 3.17 | \n",
"
\n",
" \n",
" non-binary SD_2 | \n",
" 3.00 | \n",
"
\n",
" \n",
" woman DallE | \n",
" 2.66 | \n",
"
\n",
" \n",
" person DallE | \n",
" 2.65 | \n",
"
\n",
" \n",
" man SD_2 | \n",
" 2.55 | \n",
"
\n",
" \n",
" woman SD_14 | \n",
" 2.52 | \n",
"
\n",
" \n",
" man SD_14 | \n",
" 2.46 | \n",
"
\n",
" \n",
" man DallE | \n",
" 2.41 | \n",
"
\n",
" \n",
" woman SD_2 | \n",
" 2.09 | \n",
"
\n",
" \n",
"
\n"
],
"text/plain": [
""
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/html": [
"\n",
"\n",
" \n",
" \n",
" | \n",
" entropy | \n",
"
\n",
" \n",
" \n",
" \n",
" non-binary SD_14 | \n",
" 4.24 | \n",
"
\n",
" \n",
" person SD_2 | \n",
" 3.90 | \n",
"
\n",
" \n",
" person SD_14 | \n",
" 3.90 | \n",
"
\n",
" \n",
" non-binary SD_2 | \n",
" 3.77 | \n",
"
\n",
" \n",
" non-binary DallE | \n",
" 3.73 | \n",
"
\n",
" \n",
" person DallE | \n",
" 3.47 | \n",
"
\n",
" \n",
" woman DallE | \n",
" 3.34 | \n",
"
\n",
" \n",
" woman SD_14 | \n",
" 3.25 | \n",
"
\n",
" \n",
" man SD_14 | \n",
" 3.15 | \n",
"
\n",
" \n",
" man SD_2 | \n",
" 3.08 | \n",
"
\n",
" \n",
" man DallE | \n",
" 2.88 | \n",
"
\n",
" \n",
" woman SD_2 | \n",
" 2.64 | \n",
"
\n",
" \n",
"
\n"
],
"text/plain": [
""
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/html": [
"\n",
"\n",
" \n",
" \n",
" | \n",
" entropy | \n",
"
\n",
" \n",
" \n",
" \n",
" person SD_14 | \n",
" 4.79 | \n",
"
\n",
" \n",
" non-binary SD_14 | \n",
" 4.70 | \n",
"
\n",
" \n",
" non-binary DallE | \n",
" 4.32 | \n",
"
\n",
" \n",
" person SD_2 | \n",
" 4.32 | \n",
"
\n",
" \n",
" person DallE | \n",
" 4.14 | \n",
"
\n",
" \n",
" woman DallE | \n",
" 3.96 | \n",
"
\n",
" \n",
" non-binary SD_2 | \n",
" 3.96 | \n",
"
\n",
" \n",
" woman SD_14 | \n",
" 3.88 | \n",
"
\n",
" \n",
" man SD_14 | \n",
" 3.86 | \n",
"
\n",
" \n",
" man SD_2 | \n",
" 3.72 | \n",
"
\n",
" \n",
" man DallE | \n",
" 3.69 | \n",
"
\n",
" \n",
" woman SD_2 | \n",
" 3.48 | \n",
"
\n",
" \n",
"
\n"
],
"text/plain": [
""
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"for d in entropies:\n",
" df = pd.DataFrame(pd.Series(d), columns=[\"entropy\"])\n",
" display(df.sort_values(\"entropy\", ascending=False).style.background_gradient(\n",
" axis=None,\n",
" vmin=0,\n",
" vmax=4,\n",
" cmap=\"YlGnBu\"\n",
").format(precision=2))"
]
},
{
"cell_type": "markdown",
"id": "45455786-7a17-440f-a82e-bd8e1663fdb0",
"metadata": {},
"source": [
"# Ethnicity X Gender"
]
},
{
"cell_type": "code",
"execution_count": 160,
"id": "9f622b73-82f6-427c-a411-ccec7ca8dd70",
"metadata": {},
"outputs": [],
"source": [
"entropies = []\n",
"random_entropies = []\n",
"for cluster_dicts in [d_12, d_24, d_48]:\n",
" entropy = dict()\n",
" random_entropy = dict()\n",
" n_clusters = len(cluster_dicts)\n",
" all_ethnicities_genders = [list(dict(d['labels_ethnicity_gender']).keys()) for d in cluster_dicts]\n",
" all_ethnicities_genders = list(set(chain(*all_ethnicities_genders)))\n",
" for ethnicity_gender in all_ethnicities_genders:\n",
" h = []\n",
" for i in cluster_dicts:\n",
" h.append(dict(i['labels_ethnicity_gender']).get(ethnicity_gender, 0))\n",
" h = np.array(h)\n",
" r = np.ones_like(h)\n",
" entropy[ethnicity_gender] = scipy.stats.entropy(h / sum(h), base=2)\n",
" entropies.append(entropy)"
]
},
{
"cell_type": "code",
"execution_count": 161,
"id": "a3844662-2a7c-49d0-972f-6f41a342c7c5",
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\n",
"\n",
" \n",
" \n",
" | \n",
" entropy | \n",
"
\n",
" \n",
" \n",
" \n",
" Southeast Asian non-binary | \n",
" 2.75 | \n",
"
\n",
" \n",
" Hispanic non-binary | \n",
" 2.59 | \n",
"
\n",
" \n",
" Latino non-binary | \n",
" 2.52 | \n",
"
\n",
" \n",
" Latinx person | \n",
" 2.50 | \n",
"
\n",
" \n",
" Pacific Islander person | \n",
" 2.37 | \n",
"
\n",
" \n",
" Multiracial woman | \n",
" 2.25 | \n",
"
\n",
" \n",
" American Indian non-binary | \n",
" 2.24 | \n",
"
\n",
" \n",
" Native American non-binary | \n",
" 2.24 | \n",
"
\n",
" \n",
" African-American non-binary | \n",
" 2.22 | \n",
"
\n",
" \n",
" Latinx non-binary | \n",
" 2.19 | \n",
"
\n",
" \n",
" Pacific Islander woman | \n",
" 2.16 | \n",
"
\n",
" \n",
" Multiracial non-binary | \n",
" 2.16 | \n",
"
\n",
" \n",
" Pacific Islander man | \n",
" 2.16 | \n",
"
\n",
" \n",
" First Nations woman | \n",
" 2.10 | \n",
"
\n",
" \n",
" Latino person | \n",
" 2.09 | \n",
"
\n",
" \n",
" Hispanic person | \n",
" 2.07 | \n",
"
\n",
" \n",
" First Nations person | \n",
" 2.07 | \n",
"
\n",
" \n",
" Indigenous American non-binary | \n",
" 2.06 | \n",
"
\n",
" \n",
" Multiracial person | \n",
" 2.05 | \n",
"
\n",
" \n",
" woman | \n",
" 2.04 | \n",
"
\n",
" \n",
" First Nations non-binary | \n",
" 1.95 | \n",
"
\n",
" \n",
" Indigenous American person | \n",
" 1.88 | \n",
"
\n",
" \n",
" White person | \n",
" 1.88 | \n",
"
\n",
" \n",
" Pacific Islander non-binary | \n",
" 1.87 | \n",
"
\n",
" \n",
" person | \n",
" 1.87 | \n",
"
\n",
" \n",
" Native American person | \n",
" 1.83 | \n",
"
\n",
" \n",
" Latino woman | \n",
" 1.77 | \n",
"
\n",
" \n",
" Indigenous American woman | \n",
" 1.76 | \n",
"
\n",
" \n",
" Southeast Asian woman | \n",
" 1.75 | \n",
"
\n",
" \n",
" White woman | \n",
" 1.74 | \n",
"
\n",
" \n",
" Latinx man | \n",
" 1.66 | \n",
"
\n",
" \n",
" Caucasian non-binary | \n",
" 1.66 | \n",
"
\n",
" \n",
" Black person | \n",
" 1.63 | \n",
"
\n",
" \n",
" Latino man | \n",
" 1.62 | \n",
"
\n",
" \n",
" Caucasian woman | \n",
" 1.62 | \n",
"
\n",
" \n",
" Native American woman | \n",
" 1.59 | \n",
"
\n",
" \n",
" American Indian man | \n",
" 1.56 | \n",
"
\n",
" \n",
" American Indian woman | \n",
" 1.56 | \n",
"
\n",
" \n",
" American Indian person | \n",
" 1.53 | \n",
"
\n",
" \n",
" Native American man | \n",
" 1.51 | \n",
"
\n",
" \n",
" South Asian non-binary | \n",
" 1.49 | \n",
"
\n",
" \n",
" Hispanic man | \n",
" 1.49 | \n",
"
\n",
" \n",
" Southeast Asian person | \n",
" 1.47 | \n",
"
\n",
" \n",
" East Asian non-binary | \n",
" 1.45 | \n",
"
\n",
" \n",
" Multiracial man | \n",
" 1.45 | \n",
"
\n",
" \n",
" Black non-binary | \n",
" 1.38 | \n",
"
\n",
" \n",
" East Asian person | \n",
" 1.38 | \n",
"
\n",
" \n",
" White non-binary | \n",
" 1.37 | \n",
"
\n",
" \n",
" First Nations man | \n",
" 1.37 | \n",
"
\n",
" \n",
" Indigenous American man | \n",
" 1.36 | \n",
"
\n",
" \n",
" Caucasian person | \n",
" 1.30 | \n",
"
\n",
" \n",
" Caucasian man | \n",
" 1.16 | \n",
"
\n",
" \n",
" Latinx woman | \n",
" 1.10 | \n",
"
\n",
" \n",
" Hispanic woman | \n",
" 0.92 | \n",
"
\n",
" \n",
" Southeast Asian man | \n",
" 0.92 | \n",
"
\n",
" \n",
" Black woman | \n",
" 0.88 | \n",
"
\n",
" \n",
" African-American person | \n",
" 0.72 | \n",
"
\n",
" \n",
" South Asian person | \n",
" 0.72 | \n",
"
\n",
" \n",
" East Asian man | \n",
" 0.72 | \n",
"
\n",
" \n",
" East Asian woman | \n",
" 0.47 | \n",
"
\n",
" \n",
" White man | \n",
" 0.47 | \n",
"
\n",
" \n",
" South Asian man | \n",
" 0.47 | \n",
"
\n",
" \n",
" man | \n",
" 0.47 | \n",
"
\n",
" \n",
" African-American woman | \n",
" 0.00 | \n",
"
\n",
" \n",
" South Asian woman | \n",
" 0.00 | \n",
"
\n",
" \n",
" Black man | \n",
" 0.00 | \n",
"
\n",
" \n",
" African-American man | \n",
" 0.00 | \n",
"
\n",
" \n",
"
\n"
],
"text/plain": [
""
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/html": [
"\n",
"\n",
" \n",
" \n",
" | \n",
" entropy | \n",
"
\n",
" \n",
" \n",
" \n",
" Southeast Asian non-binary | \n",
" 3.38 | \n",
"
\n",
" \n",
" Latino non-binary | \n",
" 3.12 | \n",
"
\n",
" \n",
" Pacific Islander non-binary | \n",
" 3.04 | \n",
"
\n",
" \n",
" First Nations non-binary | \n",
" 3.02 | \n",
"
\n",
" \n",
" Hispanic non-binary | \n",
" 3.02 | \n",
"
\n",
" \n",
" Latinx person | \n",
" 2.87 | \n",
"
\n",
" \n",
" Indigenous American non-binary | \n",
" 2.79 | \n",
"
\n",
" \n",
" First Nations person | \n",
" 2.77 | \n",
"
\n",
" \n",
" Pacific Islander person | \n",
" 2.75 | \n",
"
\n",
" \n",
" Multiracial non-binary | \n",
" 2.73 | \n",
"
\n",
" \n",
" First Nations woman | \n",
" 2.66 | \n",
"
\n",
" \n",
" Pacific Islander woman | \n",
" 2.66 | \n",
"
\n",
" \n",
" Latinx non-binary | \n",
" 2.60 | \n",
"
\n",
" \n",
" Pacific Islander man | \n",
" 2.58 | \n",
"
\n",
" \n",
" Multiracial person | \n",
" 2.57 | \n",
"
\n",
" \n",
" Native American person | \n",
" 2.52 | \n",
"
\n",
" \n",
" Multiracial woman | \n",
" 2.52 | \n",
"
\n",
" \n",
" Latinx man | \n",
" 2.50 | \n",
"
\n",
" \n",
" American Indian non-binary | \n",
" 2.50 | \n",
"
\n",
" \n",
" Indigenous American person | \n",
" 2.47 | \n",
"
\n",
" \n",
" Latino woman | \n",
" 2.47 | \n",
"
\n",
" \n",
" Multiracial man | \n",
" 2.45 | \n",
"
\n",
" \n",
" Southeast Asian woman | \n",
" 2.45 | \n",
"
\n",
" \n",
" person | \n",
" 2.42 | \n",
"
\n",
" \n",
" woman | \n",
" 2.37 | \n",
"
\n",
" \n",
" Native American non-binary | \n",
" 2.36 | \n",
"
\n",
" \n",
" American Indian person | \n",
" 2.34 | \n",
"
\n",
" \n",
" Hispanic person | \n",
" 2.33 | \n",
"
\n",
" \n",
" American Indian man | \n",
" 2.30 | \n",
"
\n",
" \n",
" Caucasian non-binary | \n",
" 2.29 | \n",
"
\n",
" \n",
" Latino man | \n",
" 2.28 | \n",
"
\n",
" \n",
" Native American man | \n",
" 2.28 | \n",
"
\n",
" \n",
" Latino person | \n",
" 2.25 | \n",
"
\n",
" \n",
" Caucasian man | \n",
" 2.25 | \n",
"
\n",
" \n",
" African-American non-binary | \n",
" 2.22 | \n",
"
\n",
" \n",
" White woman | \n",
" 2.18 | \n",
"
\n",
" \n",
" Caucasian woman | \n",
" 2.11 | \n",
"
\n",
" \n",
" East Asian non-binary | \n",
" 2.11 | \n",
"
\n",
" \n",
" White person | \n",
" 2.06 | \n",
"
\n",
" \n",
" First Nations man | \n",
" 2.05 | \n",
"
\n",
" \n",
" Indigenous American woman | \n",
" 2.03 | \n",
"
\n",
" \n",
" Indigenous American man | \n",
" 2.01 | \n",
"
\n",
" \n",
" Native American woman | \n",
" 2.00 | \n",
"
\n",
" \n",
" American Indian woman | \n",
" 1.97 | \n",
"
\n",
" \n",
" White non-binary | \n",
" 1.96 | \n",
"
\n",
" \n",
" Black person | \n",
" 1.87 | \n",
"
\n",
" \n",
" Hispanic man | \n",
" 1.85 | \n",
"
\n",
" \n",
" Caucasian person | \n",
" 1.75 | \n",
"
\n",
" \n",
" Black non-binary | \n",
" 1.75 | \n",
"
\n",
" \n",
" Latinx woman | \n",
" 1.69 | \n",
"
\n",
" \n",
" South Asian non-binary | \n",
" 1.68 | \n",
"
\n",
" \n",
" Southeast Asian person | \n",
" 1.47 | \n",
"
\n",
" \n",
" East Asian person | \n",
" 1.38 | \n",
"
\n",
" \n",
" Hispanic woman | \n",
" 1.36 | \n",
"
\n",
" \n",
" East Asian man | \n",
" 1.10 | \n",
"
\n",
" \n",
" Black man | \n",
" 0.95 | \n",
"
\n",
" \n",
" African-American person | \n",
" 0.92 | \n",
"
\n",
" \n",
" Southeast Asian man | \n",
" 0.92 | \n",
"
\n",
" \n",
" Black woman | \n",
" 0.88 | \n",
"
\n",
" \n",
" man | \n",
" 0.87 | \n",
"
\n",
" \n",
" White man | \n",
" 0.87 | \n",
"
\n",
" \n",
" South Asian person | \n",
" 0.72 | \n",
"
\n",
" \n",
" African-American man | \n",
" 0.65 | \n",
"
\n",
" \n",
" South Asian man | \n",
" 0.47 | \n",
"
\n",
" \n",
" East Asian woman | \n",
" 0.47 | \n",
"
\n",
" \n",
" South Asian woman | \n",
" 0.00 | \n",
"
\n",
" \n",
" African-American woman | \n",
" 0.00 | \n",
"
\n",
" \n",
"
\n"
],
"text/plain": [
""
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/html": [
"\n",
"\n",
" \n",
" \n",
" | \n",
" entropy | \n",
"
\n",
" \n",
" \n",
" \n",
" Hispanic non-binary | \n",
" 3.57 | \n",
"
\n",
" \n",
" Pacific Islander person | \n",
" 3.45 | \n",
"
\n",
" \n",
" First Nations person | \n",
" 3.41 | \n",
"
\n",
" \n",
" Multiracial non-binary | \n",
" 3.38 | \n",
"
\n",
" \n",
" Pacific Islander woman | \n",
" 3.35 | \n",
"
\n",
" \n",
" Pacific Islander non-binary | \n",
" 3.33 | \n",
"
\n",
" \n",
" Native American person | \n",
" 3.28 | \n",
"
\n",
" \n",
" Indigenous American person | \n",
" 3.27 | \n",
"
\n",
" \n",
" Latino non-binary | \n",
" 3.25 | \n",
"
\n",
" \n",
" Native American non-binary | \n",
" 3.24 | \n",
"
\n",
" \n",
" Latinx person | \n",
" 3.10 | \n",
"
\n",
" \n",
" Indigenous American non-binary | \n",
" 3.06 | \n",
"
\n",
" \n",
" American Indian non-binary | \n",
" 3.06 | \n",
"
\n",
" \n",
" American Indian man | \n",
" 3.05 | \n",
"
\n",
" \n",
" First Nations non-binary | \n",
" 3.03 | \n",
"
\n",
" \n",
" Latino person | \n",
" 3.01 | \n",
"
\n",
" \n",
" person | \n",
" 2.98 | \n",
"
\n",
" \n",
" Multiracial person | \n",
" 2.97 | \n",
"
\n",
" \n",
" First Nations woman | \n",
" 2.97 | \n",
"
\n",
" \n",
" Latinx man | \n",
" 2.95 | \n",
"
\n",
" \n",
" Hispanic person | \n",
" 2.95 | \n",
"
\n",
" \n",
" Indigenous American man | \n",
" 2.95 | \n",
"
\n",
" \n",
" Latinx non-binary | \n",
" 2.93 | \n",
"
\n",
" \n",
" Native American man | \n",
" 2.91 | \n",
"
\n",
" \n",
" woman | \n",
" 2.90 | \n",
"
\n",
" \n",
" Latino woman | \n",
" 2.87 | \n",
"
\n",
" \n",
" African-American non-binary | \n",
" 2.85 | \n",
"
\n",
" \n",
" Pacific Islander man | \n",
" 2.82 | \n",
"
\n",
" \n",
" Hispanic man | \n",
" 2.78 | \n",
"
\n",
" \n",
" Latino man | \n",
" 2.76 | \n",
"
\n",
" \n",
" Latinx woman | \n",
" 2.75 | \n",
"
\n",
" \n",
" Multiracial woman | \n",
" 2.73 | \n",
"
\n",
" \n",
" Multiracial man | \n",
" 2.72 | \n",
"
\n",
" \n",
" Southeast Asian non-binary | \n",
" 2.66 | \n",
"
\n",
" \n",
" Caucasian non-binary | \n",
" 2.64 | \n",
"
\n",
" \n",
" Native American woman | \n",
" 2.62 | \n",
"
\n",
" \n",
" American Indian person | \n",
" 2.58 | \n",
"
\n",
" \n",
" White woman | \n",
" 2.54 | \n",
"
\n",
" \n",
" Indigenous American woman | \n",
" 2.49 | \n",
"
\n",
" \n",
" South Asian non-binary | \n",
" 2.46 | \n",
"
\n",
" \n",
" White non-binary | \n",
" 2.45 | \n",
"
\n",
" \n",
" Caucasian woman | \n",
" 2.35 | \n",
"
\n",
" \n",
" White person | \n",
" 2.33 | \n",
"
\n",
" \n",
" First Nations man | \n",
" 2.27 | \n",
"
\n",
" \n",
" American Indian woman | \n",
" 2.19 | \n",
"
\n",
" \n",
" Hispanic woman | \n",
" 2.03 | \n",
"
\n",
" \n",
" Black person | \n",
" 2.02 | \n",
"
\n",
" \n",
" Caucasian man | \n",
" 2.00 | \n",
"
\n",
" \n",
" African-American person | \n",
" 1.96 | \n",
"
\n",
" \n",
" Southeast Asian woman | \n",
" 1.94 | \n",
"
\n",
" \n",
" East Asian non-binary | \n",
" 1.88 | \n",
"
\n",
" \n",
" Black non-binary | \n",
" 1.88 | \n",
"
\n",
" \n",
" Southeast Asian man | \n",
" 1.86 | \n",
"
\n",
" \n",
" Caucasian person | \n",
" 1.72 | \n",
"
\n",
" \n",
" White man | \n",
" 1.66 | \n",
"
\n",
" \n",
" Black man | \n",
" 1.55 | \n",
"
\n",
" \n",
" East Asian man | \n",
" 1.49 | \n",
"
\n",
" \n",
" Southeast Asian person | \n",
" 1.43 | \n",
"
\n",
" \n",
" East Asian person | \n",
" 1.41 | \n",
"
\n",
" \n",
" South Asian woman | \n",
" 1.36 | \n",
"
\n",
" \n",
" Black woman | \n",
" 1.23 | \n",
"
\n",
" \n",
" man | \n",
" 1.21 | \n",
"
\n",
" \n",
" African-American woman | \n",
" 1.14 | \n",
"
\n",
" \n",
" African-American man | \n",
" 0.99 | \n",
"
\n",
" \n",
" South Asian person | \n",
" 0.92 | \n",
"
\n",
" \n",
" East Asian woman | \n",
" 0.87 | \n",
"
\n",
" \n",
" South Asian man | \n",
" 0.47 | \n",
"
\n",
" \n",
"
\n"
],
"text/plain": [
""
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"for d in entropies:\n",
" df = pd.DataFrame(pd.Series(d), columns=[\"entropy\"])\n",
" display(df.sort_values(\"entropy\", ascending=False).style.background_gradient(\n",
" axis=None,\n",
" vmin=0,\n",
" vmax=4,\n",
" cmap=\"YlGnBu\"\n",
").format(precision=2))"
]
},
{
"cell_type": "markdown",
"id": "0a12146d-ce28-419d-9fe9-7987284d437d",
"metadata": {},
"source": [
"# Genders X Ethnicities X Model"
]
},
{
"cell_type": "code",
"execution_count": 66,
"id": "78cc3ec7-c32e-408f-a0c6-c121135f9449",
"metadata": {},
"outputs": [],
"source": [
"entropies = []\n",
"for cluster_dicts in [d_12, d_24, d_48]:\n",
" entropy = dict()\n",
" n_clusters = len(cluster_dicts)\n",
" all_labels = [list(dict(d['labels_full']).keys()) for d in cluster_dicts]\n",
" all_labels = list(set(chain(*all_labels)))\n",
" for label in all_labels:\n",
" h = []\n",
" for i in cluster_dicts:\n",
" h.append(dict(i['labels_full']).get(label, 0))\n",
" h = np.array(h)\n",
" entropy[label] = scipy.stats.entropy(h / sum(h), base=2)\n",
" entropies.append(entropy)"
]
},
{
"cell_type": "code",
"execution_count": 67,
"id": "08b5912c-6add-428e-8fcc-1232ef17112e",
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\n",
"\n",
" \n",
" \n",
" | \n",
" entropy | \n",
"
\n",
" \n",
" \n",
" \n",
" Hispanic non-binary SD_14 | \n",
" 2.37 | \n",
"
\n",
" \n",
" Latinx person SD_2 | \n",
" 2.25 | \n",
"
\n",
" \n",
" Multiracial woman DallE | \n",
" 2.12 | \n",
"
\n",
" \n",
" Latino non-binary DallE | \n",
" 2.12 | \n",
"
\n",
" \n",
" Native American non-binary DallE | \n",
" 2.12 | \n",
"
\n",
" \n",
" Hispanic non-binary SD_2 | \n",
" 2.05 | \n",
"
\n",
" \n",
" Southeast Asian non-binary SD_14 | \n",
" 2.05 | \n",
"
\n",
" \n",
" American Indian non-binary SD_2 | \n",
" 1.96 | \n",
"
\n",
" \n",
" White person SD_14 | \n",
" 1.96 | \n",
"
\n",
" \n",
" African-American non-binary SD_14 | \n",
" 1.96 | \n",
"
\n",
" \n",
" Southeast Asian non-binary DallE | \n",
" 1.96 | \n",
"
\n",
" \n",
" Pacific Islander woman SD_2 | \n",
" 1.90 | \n",
"
\n",
" \n",
" Hispanic non-binary DallE | \n",
" 1.85 | \n",
"
\n",
" \n",
" Latinx person DallE | \n",
" 1.85 | \n",
"
\n",
" \n",
" Multiracial non-binary DallE | \n",
" 1.85 | \n",
"
\n",
" \n",
" Pacific Islander person SD_14 | \n",
" 1.85 | \n",
"
\n",
" \n",
" Native American non-binary SD_2 | \n",
" 1.85 | \n",
"
\n",
" \n",
" Southeast Asian woman DallE | \n",
" 1.85 | \n",
"
\n",
" \n",
" Latinx non-binary SD_14 | \n",
" 1.76 | \n",
"
\n",
" \n",
" woman SD_2 | \n",
" 1.76 | \n",
"
\n",
" \n",
" American Indian non-binary DallE | \n",
" 1.76 | \n",
"
\n",
" \n",
" Pacific Islander person SD_2 | \n",
" 1.76 | \n",
"
\n",
" \n",
" First Nations non-binary DallE | \n",
" 1.72 | \n",
"
\n",
" \n",
" First Nations person DallE | \n",
" 1.72 | \n",
"
\n",
" \n",
" Indigenous American non-binary SD_2 | \n",
" 1.72 | \n",
"
\n",
" \n",
" Indigenous American person DallE | \n",
" 1.69 | \n",
"
\n",
" \n",
" Latino non-binary SD_2 | \n",
" 1.69 | \n",
"
\n",
" \n",
" Multiracial person DallE | \n",
" 1.69 | \n",
"
\n",
" \n",
" Caucasian non-binary SD_14 | \n",
" 1.69 | \n",
"
\n",
" \n",
" Latino woman DallE | \n",
" 1.57 | \n",
"
\n",
" \n",
" Latino woman SD_14 | \n",
" 1.57 | \n",
"
\n",
" \n",
" Pacific Islander non-binary SD_14 | \n",
" 1.57 | \n",
"
\n",
" \n",
" person SD_14 | \n",
" 1.57 | \n",
"
\n",
" \n",
" Latino non-binary SD_14 | \n",
" 1.57 | \n",
"
\n",
" \n",
" Pacific Islander non-binary SD_2 | \n",
" 1.57 | \n",
"
\n",
" \n",
" Indigenous American non-binary DallE | \n",
" 1.52 | \n",
"
\n",
" \n",
" Native American woman DallE | \n",
" 1.52 | \n",
"
\n",
" \n",
" Pacific Islander non-binary DallE | \n",
" 1.52 | \n",
"
\n",
" \n",
" First Nations woman DallE | \n",
" 1.49 | \n",
"
\n",
" \n",
" Latinx non-binary SD_2 | \n",
" 1.49 | \n",
"
\n",
" \n",
" Hispanic man SD_14 | \n",
" 1.49 | \n",
"
\n",
" \n",
" White non-binary SD_2 | \n",
" 1.37 | \n",
"
\n",
" \n",
" Multiracial man SD_14 | \n",
" 1.37 | \n",
"
\n",
" \n",
" Pacific Islander woman SD_14 | \n",
" 1.36 | \n",
"
\n",
" \n",
" First Nations non-binary SD_14 | \n",
" 1.36 | \n",
"
\n",
" \n",
" Latinx man SD_2 | \n",
" 1.36 | \n",
"
\n",
" \n",
" Native American person DallE | \n",
" 1.36 | \n",
"
\n",
" \n",
" Black non-binary SD_14 | \n",
" 1.36 | \n",
"
\n",
" \n",
" Latino person SD_2 | \n",
" 1.36 | \n",
"
\n",
" \n",
" Latino person SD_14 | \n",
" 1.36 | \n",
"
\n",
" \n",
" Latinx man DallE | \n",
" 1.36 | \n",
"
\n",
" \n",
" Pacific Islander man SD_2 | \n",
" 1.36 | \n",
"
\n",
" \n",
" Caucasian woman DallE | \n",
" 1.30 | \n",
"
\n",
" \n",
" East Asian non-binary DallE | \n",
" 1.30 | \n",
"
\n",
" \n",
" Caucasian person SD_14 | \n",
" 1.30 | \n",
"
\n",
" \n",
" Indigenous American woman DallE | \n",
" 1.30 | \n",
"
\n",
" \n",
" Latino man SD_2 | \n",
" 1.30 | \n",
"
\n",
" \n",
" White woman SD_14 | \n",
" 1.16 | \n",
"
\n",
" \n",
" Latinx person SD_14 | \n",
" 1.16 | \n",
"
\n",
" \n",
" East Asian non-binary SD_2 | \n",
" 1.16 | \n",
"
\n",
" \n",
" Hispanic person SD_2 | \n",
" 1.16 | \n",
"
\n",
" \n",
" East Asian person DallE | \n",
" 1.16 | \n",
"
\n",
" \n",
" Hispanic person SD_14 | \n",
" 1.16 | \n",
"
\n",
" \n",
" Multiracial non-binary SD_14 | \n",
" 1.16 | \n",
"
\n",
" \n",
" Pacific Islander man DallE | \n",
" 1.16 | \n",
"
\n",
" \n",
" Multiracial man SD_2 | \n",
" 1.16 | \n",
"
\n",
" \n",
" African-American non-binary DallE | \n",
" 1.16 | \n",
"
\n",
" \n",
" Multiracial person SD_14 | \n",
" 1.16 | \n",
"
\n",
" \n",
" Caucasian man SD_14 | \n",
" 1.16 | \n",
"
\n",
" \n",
" Latino man DallE | \n",
" 1.16 | \n",
"
\n",
" \n",
" First Nations non-binary SD_2 | \n",
" 1.16 | \n",
"
\n",
" \n",
" Indigenous American man DallE | \n",
" 1.00 | \n",
"
\n",
" \n",
" South Asian non-binary DallE | \n",
" 1.00 | \n",
"
\n",
" \n",
" First Nations person SD_14 | \n",
" 1.00 | \n",
"
\n",
" \n",
" Native American person SD_2 | \n",
" 1.00 | \n",
"
\n",
" \n",
" East Asian person SD_14 | \n",
" 0.97 | \n",
"
\n",
" \n",
" Native American man SD_2 | \n",
" 0.97 | \n",
"
\n",
" \n",
" American Indian person SD_2 | \n",
" 0.97 | \n",
"
\n",
" \n",
" Hispanic person DallE | \n",
" 0.97 | \n",
"
\n",
" \n",
" South Asian non-binary SD_14 | \n",
" 0.97 | \n",
"
\n",
" \n",
" First Nations man DallE | \n",
" 0.97 | \n",
"
\n",
" \n",
" Latino man SD_14 | \n",
" 0.97 | \n",
"
\n",
" \n",
" Indigenous American woman SD_14 | \n",
" 0.97 | \n",
"
\n",
" \n",
" Latino person DallE | \n",
" 0.97 | \n",
"
\n",
" \n",
" Caucasian person SD_2 | \n",
" 0.97 | \n",
"
\n",
" \n",
" Black person SD_14 | \n",
" 0.97 | \n",
"
\n",
" \n",
" Indigenous American man SD_14 | \n",
" 0.97 | \n",
"
\n",
" \n",
" White woman DallE | \n",
" 0.97 | \n",
"
\n",
" \n",
" American Indian woman DallE | \n",
" 0.97 | \n",
"
\n",
" \n",
" Hispanic man SD_2 | \n",
" 0.97 | \n",
"
\n",
" \n",
" American Indian man SD_2 | \n",
" 0.97 | \n",
"
\n",
" \n",
" American Indian man DallE | \n",
" 0.97 | \n",
"
\n",
" \n",
" Multiracial person SD_2 | \n",
" 0.97 | \n",
"
\n",
" \n",
" American Indian woman SD_14 | \n",
" 0.97 | \n",
"
\n",
" \n",
" Latinx non-binary DallE | \n",
" 0.97 | \n",
"
\n",
" \n",
" White person SD_2 | \n",
" 0.92 | \n",
"
\n",
" \n",
" Multiracial man DallE | \n",
" 0.92 | \n",
"
\n",
" \n",
" Multiracial woman SD_14 | \n",
" 0.92 | \n",
"
\n",
" \n",
" Indigenous American non-binary SD_14 | \n",
" 0.92 | \n",
"
\n",
" \n",
" Hispanic woman SD_2 | \n",
" 0.92 | \n",
"
\n",
" \n",
" Southeast Asian man DallE | \n",
" 0.92 | \n",
"
\n",
" \n",
" Southeast Asian non-binary SD_2 | \n",
" 0.88 | \n",
"
\n",
" \n",
" Native American man DallE | \n",
" 0.88 | \n",
"
\n",
" \n",
" Pacific Islander woman DallE | \n",
" 0.88 | \n",
"
\n",
" \n",
" American Indian person DallE | \n",
" 0.88 | \n",
"
\n",
" \n",
" Pacific Islander man SD_14 | \n",
" 0.88 | \n",
"
\n",
" \n",
" East Asian person SD_2 | \n",
" 0.88 | \n",
"
\n",
" \n",
" Black woman DallE | \n",
" 0.88 | \n",
"
\n",
" \n",
" East Asian man DallE | \n",
" 0.72 | \n",
"
\n",
" \n",
" First Nations woman SD_14 | \n",
" 0.72 | \n",
"
\n",
" \n",
" Black non-binary DallE | \n",
" 0.72 | \n",
"
\n",
" \n",
" First Nations man SD_2 | \n",
" 0.72 | \n",
"
\n",
" \n",
" African-American person SD_14 | \n",
" 0.72 | \n",
"
\n",
" \n",
" Hispanic woman SD_14 | \n",
" 0.72 | \n",
"
\n",
" \n",
" First Nations man SD_14 | \n",
" 0.72 | \n",
"
\n",
" \n",
" South Asian non-binary SD_2 | \n",
" 0.72 | \n",
"
\n",
" \n",
" Multiracial woman SD_2 | \n",
" 0.72 | \n",
"
\n",
" \n",
" White non-binary DallE | \n",
" 0.72 | \n",
"
\n",
" \n",
" person SD_2 | \n",
" 0.72 | \n",
"
\n",
" \n",
" Caucasian non-binary DallE | \n",
" 0.72 | \n",
"
\n",
" \n",
" South Asian person SD_14 | \n",
" 0.72 | \n",
"
\n",
" \n",
" Latinx woman DallE | \n",
" 0.72 | \n",
"
\n",
" \n",
" Indigenous American person SD_2 | \n",
" 0.47 | \n",
"
\n",
" \n",
" Hispanic woman DallE | \n",
" 0.47 | \n",
"
\n",
" \n",
" Indigenous American person SD_14 | \n",
" 0.47 | \n",
"
\n",
" \n",
" Caucasian man DallE | \n",
" 0.47 | \n",
"
\n",
" \n",
" East Asian non-binary SD_14 | \n",
" 0.47 | \n",
"
\n",
" \n",
" Latinx woman SD_14 | \n",
" 0.47 | \n",
"
\n",
" \n",
" Multiracial non-binary SD_2 | \n",
" 0.47 | \n",
"
\n",
" \n",
" White man DallE | \n",
" 0.47 | \n",
"
\n",
" \n",
" Native American woman SD_2 | \n",
" 0.47 | \n",
"
\n",
" \n",
" person DallE | \n",
" 0.47 | \n",
"
\n",
" \n",
" Indigenous American man SD_2 | \n",
" 0.47 | \n",
"
\n",
" \n",
" Latino woman SD_2 | \n",
" 0.47 | \n",
"
\n",
" \n",
" man SD_14 | \n",
" 0.47 | \n",
"
\n",
" \n",
" Southeast Asian person SD_14 | \n",
" 0.47 | \n",
"
\n",
" \n",
" Latinx man SD_14 | \n",
" 0.47 | \n",
"
\n",
" \n",
" East Asian woman SD_2 | \n",
" 0.47 | \n",
"
\n",
" \n",
" man SD_2 | \n",
" 0.47 | \n",
"
\n",
" \n",
" White woman SD_2 | \n",
" 0.47 | \n",
"
\n",
" \n",
" woman DallE | \n",
" 0.47 | \n",
"
\n",
" \n",
" Caucasian woman SD_14 | \n",
" 0.47 | \n",
"
\n",
" \n",
" Black person DallE | \n",
" 0.47 | \n",
"
\n",
" \n",
" Southeast Asian person DallE | \n",
" 0.47 | \n",
"
\n",
" \n",
" Southeast Asian woman SD_14 | \n",
" 0.47 | \n",
"
\n",
" \n",
" Black person SD_2 | \n",
" 0.47 | \n",
"
\n",
" \n",
" Latinx woman SD_2 | \n",
" 0.47 | \n",
"
\n",
" \n",
" South Asian man DallE | \n",
" 0.47 | \n",
"
\n",
" \n",
" Southeast Asian woman SD_2 | \n",
" 0.00 | \n",
"
\n",
" \n",
" American Indian man SD_14 | \n",
" 0.00 | \n",
"
\n",
" \n",
" Southeast Asian man SD_14 | \n",
" 0.00 | \n",
"
\n",
" \n",
" African-American person SD_2 | \n",
" 0.00 | \n",
"
\n",
" \n",
" man DallE | \n",
" 0.00 | \n",
"
\n",
" \n",
" White man SD_2 | \n",
" 0.00 | \n",
"
\n",
" \n",
" White non-binary SD_14 | \n",
" 0.00 | \n",
"
\n",
" \n",
" South Asian person SD_2 | \n",
" 0.00 | \n",
"
\n",
" \n",
" Black man SD_14 | \n",
" 0.00 | \n",
"
\n",
" \n",
" South Asian woman DallE | \n",
" 0.00 | \n",
"
\n",
" \n",
" American Indian non-binary SD_14 | \n",
" 0.00 | \n",
"
\n",
" \n",
" Caucasian non-binary SD_2 | \n",
" 0.00 | \n",
"
\n",
" \n",
" East Asian man SD_14 | \n",
" 0.00 | \n",
"
\n",
" \n",
" Caucasian man SD_2 | \n",
" 0.00 | \n",
"
\n",
" \n",
" African-American man SD_2 | \n",
" 0.00 | \n",
"
\n",
" \n",
" Black man SD_2 | \n",
" 0.00 | \n",
"
\n",
" \n",
" Black woman SD_14 | \n",
" 0.00 | \n",
"
\n",
" \n",
" Southeast Asian person SD_2 | \n",
" 0.00 | \n",
"
\n",
" \n",
" African-American man DallE | \n",
" 0.00 | \n",
"
\n",
" \n",
" East Asian man SD_2 | \n",
" 0.00 | \n",
"
\n",
" \n",
" Hispanic man DallE | \n",
" 0.00 | \n",
"
\n",
" \n",
" Black non-binary SD_2 | \n",
" 0.00 | \n",
"
\n",
" \n",
" Native American man SD_14 | \n",
" 0.00 | \n",
"
\n",
" \n",
" Black man DallE | \n",
" 0.00 | \n",
"
\n",
" \n",
" Pacific Islander person DallE | \n",
" 0.00 | \n",
"
\n",
" \n",
" woman SD_14 | \n",
" 0.00 | \n",
"
\n",
" \n",
" African-American woman SD_2 | \n",
" 0.00 | \n",
"
\n",
" \n",
" East Asian woman SD_14 | \n",
" 0.00 | \n",
"
\n",
" \n",
" First Nations woman SD_2 | \n",
" 0.00 | \n",
"
\n",
" \n",
" American Indian person SD_14 | \n",
" 0.00 | \n",
"
\n",
" \n",
" African-American man SD_14 | \n",
" 0.00 | \n",
"
\n",
" \n",
" East Asian woman DallE | \n",
" 0.00 | \n",
"
\n",
" \n",
" African-American woman SD_14 | \n",
" 0.00 | \n",
"
\n",
" \n",
" South Asian woman SD_2 | \n",
" 0.00 | \n",
"
\n",
" \n",
" Indigenous American woman SD_2 | \n",
" 0.00 | \n",
"
\n",
" \n",
" South Asian man SD_14 | \n",
" 0.00 | \n",
"
\n",
" \n",
" Native American person SD_14 | \n",
" 0.00 | \n",
"
\n",
" \n",
" American Indian woman SD_2 | \n",
" 0.00 | \n",
"
\n",
" \n",
" South Asian man SD_2 | \n",
" 0.00 | \n",
"
\n",
" \n",
" Southeast Asian man SD_2 | \n",
" 0.00 | \n",
"
\n",
" \n",
" White person DallE | \n",
" 0.00 | \n",
"
\n",
" \n",
" First Nations person SD_2 | \n",
" 0.00 | \n",
"
\n",
" \n",
" African-American person DallE | \n",
" 0.00 | \n",
"
\n",
" \n",
" African-American non-binary SD_2 | \n",
" 0.00 | \n",
"
\n",
" \n",
" White man SD_14 | \n",
" 0.00 | \n",
"
\n",
" \n",
" Caucasian woman SD_2 | \n",
" 0.00 | \n",
"
\n",
" \n",
" Native American woman SD_14 | \n",
" 0.00 | \n",
"
\n",
" \n",
" Native American non-binary SD_14 | \n",
" 0.00 | \n",
"
\n",
" \n",
" South Asian woman SD_14 | \n",
" 0.00 | \n",
"
\n",
" \n",
" African-American woman DallE | \n",
" 0.00 | \n",
"
\n",
" \n",
" Caucasian person DallE | \n",
" 0.00 | \n",
"
\n",
" \n",
" South Asian person DallE | \n",
" 0.00 | \n",
"
\n",
" \n",
" Black woman SD_2 | \n",
" 0.00 | \n",
"
\n",
" \n",
"
\n"
],
"text/plain": [
""
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/html": [
"\n",
"\n",
" \n",
" \n",
" | \n",
" entropy | \n",
"
\n",
" \n",
" \n",
" \n",
" Southeast Asian non-binary SD_14 | \n",
" 2.72 | \n",
"
\n",
" \n",
" Hispanic non-binary SD_14 | \n",
" 2.65 | \n",
"
\n",
" \n",
" Native American non-binary SD_2 | \n",
" 2.52 | \n",
"
\n",
" \n",
" Multiracial non-binary DallE | \n",
" 2.45 | \n",
"
\n",
" \n",
" Pacific Islander woman SD_2 | \n",
" 2.45 | \n",
"
\n",
" \n",
" Southeast Asian woman DallE | \n",
" 2.45 | \n",
"
\n",
" \n",
" Latino non-binary DallE | \n",
" 2.45 | \n",
"
\n",
" \n",
" Multiracial person DallE | \n",
" 2.45 | \n",
"
\n",
" \n",
" Pacific Islander non-binary SD_2 | \n",
" 2.45 | \n",
"
\n",
" \n",
" Multiracial woman DallE | \n",
" 2.45 | \n",
"
\n",
" \n",
" Southeast Asian non-binary DallE | \n",
" 2.32 | \n",
"
\n",
" \n",
" American Indian non-binary SD_2 | \n",
" 2.32 | \n",
"
\n",
" \n",
" Latinx person SD_2 | \n",
" 2.25 | \n",
"
\n",
" \n",
" Pacific Islander person SD_2 | \n",
" 2.25 | \n",
"
\n",
" \n",
" Latinx person DallE | \n",
" 2.17 | \n",
"
\n",
" \n",
" First Nations woman DallE | \n",
" 2.17 | \n",
"
\n",
" \n",
" First Nations non-binary SD_14 | \n",
" 2.17 | \n",
"
\n",
" \n",
" Native American non-binary DallE | \n",
" 2.12 | \n",
"
\n",
" \n",
" Latinx man DallE | \n",
" 2.12 | \n",
"
\n",
" \n",
" woman SD_2 | \n",
" 2.12 | \n",
"
\n",
" \n",
" Hispanic non-binary DallE | \n",
" 2.12 | \n",
"
\n",
" \n",
" Hispanic non-binary SD_2 | \n",
" 2.05 | \n",
"
\n",
" \n",
" Latino non-binary SD_2 | \n",
" 2.05 | \n",
"
\n",
" \n",
" First Nations person DallE | \n",
" 2.05 | \n",
"
\n",
" \n",
" First Nations non-binary DallE | \n",
" 2.05 | \n",
"
\n",
" \n",
" Indigenous American non-binary SD_2 | \n",
" 2.05 | \n",
"
\n",
" \n",
" Indigenous American person DallE | \n",
" 2.05 | \n",
"
\n",
" \n",
" Pacific Islander man SD_2 | \n",
" 2.05 | \n",
"
\n",
" \n",
" Multiracial man SD_2 | \n",
" 1.96 | \n",
"
\n",
" \n",
" White non-binary SD_2 | \n",
" 1.96 | \n",
"
\n",
" \n",
" White person SD_14 | \n",
" 1.96 | \n",
"
\n",
" \n",
" Caucasian non-binary SD_14 | \n",
" 1.96 | \n",
"
\n",
" \n",
" First Nations non-binary SD_2 | \n",
" 1.96 | \n",
"
\n",
" \n",
" African-American non-binary SD_14 | \n",
" 1.96 | \n",
"
\n",
" \n",
" Pacific Islander non-binary DallE | \n",
" 1.92 | \n",
"
\n",
" \n",
" East Asian non-binary DallE | \n",
" 1.90 | \n",
"
\n",
" \n",
" Latino person SD_2 | \n",
" 1.85 | \n",
"
\n",
" \n",
" White woman SD_14 | \n",
" 1.85 | \n",
"
\n",
" \n",
" Latinx man SD_2 | \n",
" 1.85 | \n",
"
\n",
" \n",
" Pacific Islander person SD_14 | \n",
" 1.85 | \n",
"
\n",
" \n",
" Pacific Islander man DallE | \n",
" 1.85 | \n",
"
\n",
" \n",
" Hispanic man SD_14 | \n",
" 1.85 | \n",
"
\n",
" \n",
" Pacific Islander woman SD_14 | \n",
" 1.85 | \n",
"
\n",
" \n",
" Latino non-binary SD_14 | \n",
" 1.77 | \n",
"
\n",
" \n",
" Multiracial man SD_14 | \n",
" 1.76 | \n",
"
\n",
" \n",
" Latinx non-binary SD_14 | \n",
" 1.76 | \n",
"
\n",
" \n",
" American Indian non-binary DallE | \n",
" 1.76 | \n",
"
\n",
" \n",
" Latino man DallE | \n",
" 1.76 | \n",
"
\n",
" \n",
" Latino person SD_14 | \n",
" 1.72 | \n",
"
\n",
" \n",
" Latino man SD_2 | \n",
" 1.69 | \n",
"
\n",
" \n",
" American Indian man DallE | \n",
" 1.69 | \n",
"
\n",
" \n",
" Native American person DallE | \n",
" 1.69 | \n",
"
\n",
" \n",
" Caucasian person SD_14 | \n",
" 1.69 | \n",
"
\n",
" \n",
" Caucasian man SD_14 | \n",
" 1.57 | \n",
"
\n",
" \n",
" Latino woman SD_14 | \n",
" 1.57 | \n",
"
\n",
" \n",
" Multiracial non-binary SD_14 | \n",
" 1.57 | \n",
"
\n",
" \n",
" Hispanic person SD_14 | \n",
" 1.57 | \n",
"
\n",
" \n",
" Indigenous American non-binary SD_14 | \n",
" 1.57 | \n",
"
\n",
" \n",
" Hispanic person SD_2 | \n",
" 1.57 | \n",
"
\n",
" \n",
" person SD_14 | \n",
" 1.57 | \n",
"
\n",
" \n",
" Latino woman DallE | \n",
" 1.57 | \n",
"
\n",
" \n",
" Native American man DallE | \n",
" 1.57 | \n",
"
\n",
" \n",
" Southeast Asian non-binary SD_2 | \n",
" 1.57 | \n",
"
\n",
" \n",
" Pacific Islander non-binary SD_14 | \n",
" 1.57 | \n",
"
\n",
" \n",
" Native American man SD_2 | \n",
" 1.52 | \n",
"
\n",
" \n",
" Caucasian person SD_2 | \n",
" 1.52 | \n",
"
\n",
" \n",
" American Indian person SD_2 | \n",
" 1.52 | \n",
"
\n",
" \n",
" Indigenous American non-binary DallE | \n",
" 1.52 | \n",
"
\n",
" \n",
" Native American woman DallE | \n",
" 1.52 | \n",
"
\n",
" \n",
" Latinx non-binary SD_2 | \n",
" 1.49 | \n",
"
\n",
" \n",
" First Nations person SD_14 | \n",
" 1.49 | \n",
"
\n",
" \n",
" person SD_2 | \n",
" 1.49 | \n",
"
\n",
" \n",
" Latinx woman DallE | \n",
" 1.37 | \n",
"
\n",
" \n",
" First Nations man SD_14 | \n",
" 1.37 | \n",
"
\n",
" \n",
" Indigenous American woman SD_14 | \n",
" 1.37 | \n",
"
\n",
" \n",
" Black non-binary SD_14 | \n",
" 1.36 | \n",
"
\n",
" \n",
" Latinx man SD_14 | \n",
" 1.36 | \n",
"
\n",
" \n",
" Indigenous American person SD_2 | \n",
" 1.36 | \n",
"
\n",
" \n",
" Black person SD_2 | \n",
" 1.36 | \n",
"
\n",
" \n",
" Latino woman SD_2 | \n",
" 1.36 | \n",
"
\n",
" \n",
" Native American person SD_2 | \n",
" 1.36 | \n",
"
\n",
" \n",
" Hispanic person DallE | \n",
" 1.36 | \n",
"
\n",
" \n",
" Latino person DallE | \n",
" 1.30 | \n",
"
\n",
" \n",
" Indigenous American woman DallE | \n",
" 1.30 | \n",
"
\n",
" \n",
" Caucasian woman DallE | \n",
" 1.30 | \n",
"
\n",
" \n",
" American Indian man SD_2 | \n",
" 1.30 | \n",
"
\n",
" \n",
" Indigenous American man SD_14 | \n",
" 1.30 | \n",
"
\n",
" \n",
" White woman SD_2 | \n",
" 1.30 | \n",
"
\n",
" \n",
" Caucasian woman SD_14 | \n",
" 1.30 | \n",
"
\n",
" \n",
" Latinx non-binary DallE | \n",
" 1.30 | \n",
"
\n",
" \n",
" East Asian non-binary SD_2 | \n",
" 1.16 | \n",
"
\n",
" \n",
" African-American non-binary DallE | \n",
" 1.16 | \n",
"
\n",
" \n",
" Latinx woman SD_14 | \n",
" 1.16 | \n",
"
\n",
" \n",
" East Asian person DallE | \n",
" 1.16 | \n",
"
\n",
" \n",
" Hispanic woman SD_14 | \n",
" 1.16 | \n",
"
\n",
" \n",
" American Indian person DallE | \n",
" 1.16 | \n",
"
\n",
" \n",
" Latinx person SD_14 | \n",
" 1.16 | \n",
"
\n",
" \n",
" Multiracial person SD_14 | \n",
" 1.16 | \n",
"
\n",
" \n",
" Black non-binary DallE | \n",
" 1.16 | \n",
"
\n",
" \n",
" First Nations man SD_2 | \n",
" 1.16 | \n",
"
\n",
" \n",
" First Nations woman SD_14 | \n",
" 1.16 | \n",
"
\n",
" \n",
" Black man SD_14 | \n",
" 1.00 | \n",
"
\n",
" \n",
" American Indian non-binary SD_14 | \n",
" 1.00 | \n",
"
\n",
" \n",
" South Asian non-binary DallE | \n",
" 1.00 | \n",
"
\n",
" \n",
" African-American man SD_2 | \n",
" 1.00 | \n",
"
\n",
" \n",
" Indigenous American man DallE | \n",
" 1.00 | \n",
"
\n",
" \n",
" First Nations person SD_2 | \n",
" 0.97 | \n",
"
\n",
" \n",
" Latino man SD_14 | \n",
" 0.97 | \n",
"
\n",
" \n",
" First Nations man DallE | \n",
" 0.97 | \n",
"
\n",
" \n",
" White woman DallE | \n",
" 0.97 | \n",
"
\n",
" \n",
" East Asian person SD_14 | \n",
" 0.97 | \n",
"
\n",
" \n",
" African-American person SD_2 | \n",
" 0.97 | \n",
"
\n",
" \n",
" American Indian woman DallE | \n",
" 0.97 | \n",
"
\n",
" \n",
" Multiracial person SD_2 | \n",
" 0.97 | \n",
"
\n",
" \n",
" American Indian woman SD_14 | \n",
" 0.97 | \n",
"
\n",
" \n",
" South Asian non-binary SD_14 | \n",
" 0.97 | \n",
"
\n",
" \n",
" Black person SD_14 | \n",
" 0.97 | \n",
"
\n",
" \n",
" Hispanic man SD_2 | \n",
" 0.97 | \n",
"
\n",
" \n",
" Multiracial man DallE | \n",
" 0.92 | \n",
"
\n",
" \n",
" Southeast Asian man DallE | \n",
" 0.92 | \n",
"
\n",
" \n",
" Caucasian man DallE | \n",
" 0.92 | \n",
"
\n",
" \n",
" White person SD_2 | \n",
" 0.92 | \n",
"
\n",
" \n",
" African-American person SD_14 | \n",
" 0.92 | \n",
"
\n",
" \n",
" Hispanic woman SD_2 | \n",
" 0.92 | \n",
"
\n",
" \n",
" Black person DallE | \n",
" 0.92 | \n",
"
\n",
" \n",
" person DallE | \n",
" 0.92 | \n",
"
\n",
" \n",
" Multiracial woman SD_14 | \n",
" 0.92 | \n",
"
\n",
" \n",
" South Asian non-binary SD_2 | \n",
" 0.92 | \n",
"
\n",
" \n",
" Black man SD_2 | \n",
" 0.88 | \n",
"
\n",
" \n",
" Caucasian non-binary SD_2 | \n",
" 0.88 | \n",
"
\n",
" \n",
" East Asian person SD_2 | \n",
" 0.88 | \n",
"
\n",
" \n",
" White person DallE | \n",
" 0.88 | \n",
"
\n",
" \n",
" Pacific Islander woman DallE | \n",
" 0.88 | \n",
"
\n",
" \n",
" Black woman DallE | \n",
" 0.88 | \n",
"
\n",
" \n",
" Pacific Islander man SD_14 | \n",
" 0.88 | \n",
"
\n",
" \n",
" White non-binary DallE | \n",
" 0.72 | \n",
"
\n",
" \n",
" Multiracial woman SD_2 | \n",
" 0.72 | \n",
"
\n",
" \n",
" White non-binary SD_14 | \n",
" 0.72 | \n",
"
\n",
" \n",
" East Asian man DallE | \n",
" 0.72 | \n",
"
\n",
" \n",
" Caucasian non-binary DallE | \n",
" 0.72 | \n",
"
\n",
" \n",
" South Asian person SD_14 | \n",
" 0.72 | \n",
"
\n",
" \n",
" African-American man SD_14 | \n",
" 0.47 | \n",
"
\n",
" \n",
" Hispanic woman DallE | \n",
" 0.47 | \n",
"
\n",
" \n",
" woman SD_14 | \n",
" 0.47 | \n",
"
\n",
" \n",
" White man DallE | \n",
" 0.47 | \n",
"
\n",
" \n",
" East Asian non-binary SD_14 | \n",
" 0.47 | \n",
"
\n",
" \n",
" Native American non-binary SD_14 | \n",
" 0.47 | \n",
"
\n",
" \n",
" Southeast Asian person SD_14 | \n",
" 0.47 | \n",
"
\n",
" \n",
" White man SD_14 | \n",
" 0.47 | \n",
"
\n",
" \n",
" Indigenous American man SD_2 | \n",
" 0.47 | \n",
"
\n",
" \n",
" East Asian man SD_14 | \n",
" 0.47 | \n",
"
\n",
" \n",
" White man SD_2 | \n",
" 0.47 | \n",
"
\n",
" \n",
" man DallE | \n",
" 0.47 | \n",
"
\n",
" \n",
" Caucasian woman SD_2 | \n",
" 0.47 | \n",
"
\n",
" \n",
" Southeast Asian woman SD_14 | \n",
" 0.47 | \n",
"
\n",
" \n",
" Indigenous American person SD_14 | \n",
" 0.47 | \n",
"
\n",
" \n",
" man SD_2 | \n",
" 0.47 | \n",
"
\n",
" \n",
" man SD_14 | \n",
" 0.47 | \n",
"
\n",
" \n",
" Latinx woman SD_2 | \n",
" 0.47 | \n",
"
\n",
" \n",
" Native American woman SD_2 | \n",
" 0.47 | \n",
"
\n",
" \n",
" South Asian man DallE | \n",
" 0.47 | \n",
"
\n",
" \n",
" East Asian woman SD_2 | \n",
" 0.47 | \n",
"
\n",
" \n",
" Southeast Asian person DallE | \n",
" 0.47 | \n",
"
\n",
" \n",
" Multiracial non-binary SD_2 | \n",
" 0.47 | \n",
"
\n",
" \n",
" woman DallE | \n",
" 0.47 | \n",
"
\n",
" \n",
" Pacific Islander person DallE | \n",
" 0.47 | \n",
"
\n",
" \n",
" Hispanic man DallE | \n",
" 0.47 | \n",
"
\n",
" \n",
" American Indian man SD_14 | \n",
" 0.00 | \n",
"
\n",
" \n",
" Southeast Asian woman SD_2 | \n",
" 0.00 | \n",
"
\n",
" \n",
" African-American man DallE | \n",
" 0.00 | \n",
"
\n",
" \n",
" Black woman SD_14 | \n",
" 0.00 | \n",
"
\n",
" \n",
" South Asian person SD_2 | \n",
" 0.00 | \n",
"
\n",
" \n",
" South Asian woman DallE | \n",
" 0.00 | \n",
"
\n",
" \n",
" Caucasian man SD_2 | \n",
" 0.00 | \n",
"
\n",
" \n",
" Black non-binary SD_2 | \n",
" 0.00 | \n",
"
\n",
" \n",
" East Asian man SD_2 | \n",
" 0.00 | \n",
"
\n",
" \n",
" African-American woman DallE | \n",
" 0.00 | \n",
"
\n",
" \n",
" Caucasian person DallE | \n",
" 0.00 | \n",
"
\n",
" \n",
" Black man DallE | \n",
" 0.00 | \n",
"
\n",
" \n",
" American Indian person SD_14 | \n",
" 0.00 | \n",
"
\n",
" \n",
" African-American woman SD_2 | \n",
" 0.00 | \n",
"
\n",
" \n",
" First Nations woman SD_2 | \n",
" 0.00 | \n",
"
\n",
" \n",
" Southeast Asian man SD_14 | \n",
" 0.00 | \n",
"
\n",
" \n",
" East Asian woman DallE | \n",
" 0.00 | \n",
"
\n",
" \n",
" South Asian man SD_2 | \n",
" 0.00 | \n",
"
\n",
" \n",
" Indigenous American woman SD_2 | \n",
" 0.00 | \n",
"
\n",
" \n",
" East Asian woman SD_14 | \n",
" 0.00 | \n",
"
\n",
" \n",
" Native American woman SD_14 | \n",
" 0.00 | \n",
"
\n",
" \n",
" Native American person SD_14 | \n",
" 0.00 | \n",
"
\n",
" \n",
" American Indian woman SD_2 | \n",
" 0.00 | \n",
"
\n",
" \n",
" Southeast Asian man SD_2 | \n",
" 0.00 | \n",
"
\n",
" \n",
" African-American person DallE | \n",
" 0.00 | \n",
"
\n",
" \n",
" Black woman SD_2 | \n",
" 0.00 | \n",
"
\n",
" \n",
" African-American non-binary SD_2 | \n",
" 0.00 | \n",
"
\n",
" \n",
" African-American woman SD_14 | \n",
" 0.00 | \n",
"
\n",
" \n",
" South Asian man SD_14 | \n",
" 0.00 | \n",
"
\n",
" \n",
" South Asian person DallE | \n",
" 0.00 | \n",
"
\n",
" \n",
" South Asian woman SD_14 | \n",
" 0.00 | \n",
"
\n",
" \n",
" Native American man SD_14 | \n",
" 0.00 | \n",
"
\n",
" \n",
" Southeast Asian person SD_2 | \n",
" 0.00 | \n",
"
\n",
" \n",
" South Asian woman SD_2 | \n",
" 0.00 | \n",
"
\n",
" \n",
"
\n"
],
"text/plain": [
""
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/html": [
"\n",
"\n",
" \n",
" \n",
" | \n",
" entropy | \n",
"
\n",
" \n",
" \n",
" \n",
" Hispanic non-binary SD_14 | \n",
" 2.92 | \n",
"
\n",
" \n",
" Indigenous American person DallE | \n",
" 2.72 | \n",
"
\n",
" \n",
" Pacific Islander woman SD_2 | \n",
" 2.65 | \n",
"
\n",
" \n",
" First Nations person DallE | \n",
" 2.65 | \n",
"
\n",
" \n",
" Multiracial non-binary DallE | \n",
" 2.65 | \n",
"
\n",
" \n",
" Pacific Islander non-binary SD_14 | \n",
" 2.52 | \n",
"
\n",
" \n",
" Multiracial non-binary SD_14 | \n",
" 2.52 | \n",
"
\n",
" \n",
" Native American man DallE | \n",
" 2.52 | \n",
"
\n",
" \n",
" Native American person DallE | \n",
" 2.52 | \n",
"
\n",
" \n",
" Multiracial woman DallE | \n",
" 2.45 | \n",
"
\n",
" \n",
" Multiracial person DallE | \n",
" 2.45 | \n",
"
\n",
" \n",
" Pacific Islander person SD_14 | \n",
" 2.45 | \n",
"
\n",
" \n",
" Pacific Islander non-binary SD_2 | \n",
" 2.37 | \n",
"
\n",
" \n",
" Latino non-binary DallE | \n",
" 2.32 | \n",
"
\n",
" \n",
" African-American non-binary SD_14 | \n",
" 2.32 | \n",
"
\n",
" \n",
" Hispanic person SD_14 | \n",
" 2.32 | \n",
"
\n",
" \n",
" Latinx man DallE | \n",
" 2.32 | \n",
"
\n",
" \n",
" Pacific Islander man DallE | \n",
" 2.32 | \n",
"
\n",
" \n",
" First Nations non-binary DallE | \n",
" 2.32 | \n",
"
\n",
" \n",
" Pacific Islander person SD_2 | \n",
" 2.25 | \n",
"
\n",
" \n",
" Latinx person SD_2 | \n",
" 2.25 | \n",
"
\n",
" \n",
" woman SD_2 | \n",
" 2.25 | \n",
"
\n",
" \n",
" Native American non-binary SD_2 | \n",
" 2.25 | \n",
"
\n",
" \n",
" American Indian man DallE | \n",
" 2.25 | \n",
"
\n",
" \n",
" First Nations woman DallE | \n",
" 2.17 | \n",
"
\n",
" \n",
" Latinx man SD_14 | \n",
" 2.17 | \n",
"
\n",
" \n",
" Hispanic man SD_14 | \n",
" 2.17 | \n",
"
\n",
" \n",
" Latino person SD_14 | \n",
" 2.17 | \n",
"
\n",
" \n",
" Pacific Islander non-binary DallE | \n",
" 2.17 | \n",
"
\n",
" \n",
" Latinx person DallE | \n",
" 2.16 | \n",
"
\n",
" \n",
" Caucasian non-binary SD_14 | \n",
" 2.16 | \n",
"
\n",
" \n",
" person SD_14 | \n",
" 2.16 | \n",
"
\n",
" \n",
" Indigenous American non-binary SD_2 | \n",
" 2.16 | \n",
"
\n",
" \n",
" Latino person SD_2 | \n",
" 2.12 | \n",
"
\n",
" \n",
" White person SD_14 | \n",
" 2.12 | \n",
"
\n",
" \n",
" Latino non-binary SD_2 | \n",
" 2.12 | \n",
"
\n",
" \n",
" American Indian person SD_2 | \n",
" 2.12 | \n",
"
\n",
" \n",
" Native American non-binary DallE | \n",
" 2.12 | \n",
"
\n",
" \n",
" American Indian non-binary SD_2 | \n",
" 2.12 | \n",
"
\n",
" \n",
" Latinx woman SD_14 | \n",
" 2.12 | \n",
"
\n",
" \n",
" Southeast Asian woman DallE | \n",
" 2.05 | \n",
"
\n",
" \n",
" Native American person SD_2 | \n",
" 2.05 | \n",
"
\n",
" \n",
" Hispanic non-binary DallE | \n",
" 2.05 | \n",
"
\n",
" \n",
" Hispanic non-binary SD_2 | \n",
" 2.05 | \n",
"
\n",
" \n",
" Indigenous American man DallE | \n",
" 2.05 | \n",
"
\n",
" \n",
" Pacific Islander man SD_2 | \n",
" 2.05 | \n",
"
\n",
" \n",
" First Nations non-binary SD_14 | \n",
" 2.05 | \n",
"
\n",
" \n",
" First Nations person SD_14 | \n",
" 1.97 | \n",
"
\n",
" \n",
" Native American woman DallE | \n",
" 1.97 | \n",
"
\n",
" \n",
" Latinx non-binary SD_14 | \n",
" 1.96 | \n",
"
\n",
" \n",
" White non-binary SD_2 | \n",
" 1.96 | \n",
"
\n",
" \n",
" White woman SD_14 | \n",
" 1.96 | \n",
"
\n",
" \n",
" East Asian non-binary DallE | \n",
" 1.96 | \n",
"
\n",
" \n",
" Southeast Asian non-binary DallE | \n",
" 1.96 | \n",
"
\n",
" \n",
" Indigenous American person SD_14 | \n",
" 1.96 | \n",
"
\n",
" \n",
" Indigenous American non-binary DallE | \n",
" 1.90 | \n",
"
\n",
" \n",
" Latino woman SD_2 | \n",
" 1.90 | \n",
"
\n",
" \n",
" Latino man DallE | \n",
" 1.85 | \n",
"
\n",
" \n",
" Indigenous American man SD_14 | \n",
" 1.85 | \n",
"
\n",
" \n",
" Southeast Asian non-binary SD_14 | \n",
" 1.85 | \n",
"
\n",
" \n",
" Pacific Islander woman SD_14 | \n",
" 1.85 | \n",
"
\n",
" \n",
" Multiracial man DallE | \n",
" 1.85 | \n",
"
\n",
" \n",
" American Indian man SD_2 | \n",
" 1.85 | \n",
"
\n",
" \n",
" South Asian non-binary DallE | \n",
" 1.85 | \n",
"
\n",
" \n",
" Indigenous American person SD_2 | \n",
" 1.85 | \n",
"
\n",
" \n",
" Latino non-binary SD_14 | \n",
" 1.77 | \n",
"
\n",
" \n",
" Latinx woman DallE | \n",
" 1.77 | \n",
"
\n",
" \n",
" Multiracial man SD_2 | \n",
" 1.77 | \n",
"
\n",
" \n",
" First Nations non-binary SD_2 | \n",
" 1.76 | \n",
"
\n",
" \n",
" Latino woman SD_14 | \n",
" 1.76 | \n",
"
\n",
" \n",
" White man SD_14 | \n",
" 1.72 | \n",
"
\n",
" \n",
" Caucasian person SD_14 | \n",
" 1.72 | \n",
"
\n",
" \n",
" Pacific Islander woman DallE | \n",
" 1.72 | \n",
"
\n",
" \n",
" person SD_2 | \n",
" 1.69 | \n",
"
\n",
" \n",
" First Nations person SD_2 | \n",
" 1.69 | \n",
"
\n",
" \n",
" Multiracial man SD_14 | \n",
" 1.69 | \n",
"
\n",
" \n",
" Hispanic woman SD_2 | \n",
" 1.69 | \n",
"
\n",
" \n",
" Latino person DallE | \n",
" 1.69 | \n",
"
\n",
" \n",
" Latino man SD_2 | \n",
" 1.69 | \n",
"
\n",
" \n",
" African-American non-binary DallE | \n",
" 1.69 | \n",
"
\n",
" \n",
" Caucasian woman DallE | \n",
" 1.69 | \n",
"
\n",
" \n",
" White person SD_2 | \n",
" 1.57 | \n",
"
\n",
" \n",
" Caucasian man SD_14 | \n",
" 1.57 | \n",
"
\n",
" \n",
" White woman DallE | \n",
" 1.57 | \n",
"
\n",
" \n",
" Indigenous American non-binary SD_14 | \n",
" 1.57 | \n",
"
\n",
" \n",
" African-American person SD_14 | \n",
" 1.57 | \n",
"
\n",
" \n",
" American Indian non-binary DallE | \n",
" 1.57 | \n",
"
\n",
" \n",
" Southeast Asian man DallE | \n",
" 1.57 | \n",
"
\n",
" \n",
" Multiracial person SD_14 | \n",
" 1.57 | \n",
"
\n",
" \n",
" Latino woman DallE | \n",
" 1.57 | \n",
"
\n",
" \n",
" African-American person DallE | \n",
" 1.52 | \n",
"
\n",
" \n",
" woman SD_14 | \n",
" 1.52 | \n",
"
\n",
" \n",
" Caucasian woman SD_14 | \n",
" 1.52 | \n",
"
\n",
" \n",
" Native American man SD_2 | \n",
" 1.52 | \n",
"
\n",
" \n",
" East Asian person SD_14 | \n",
" 1.52 | \n",
"
\n",
" \n",
" Caucasian person SD_2 | \n",
" 1.52 | \n",
"
\n",
" \n",
" Latinx man SD_2 | \n",
" 1.52 | \n",
"
\n",
" \n",
" Pacific Islander man SD_14 | \n",
" 1.49 | \n",
"
\n",
" \n",
" African-American person SD_2 | \n",
" 1.49 | \n",
"
\n",
" \n",
" Latinx non-binary SD_2 | \n",
" 1.49 | \n",
"
\n",
" \n",
" American Indian non-binary SD_14 | \n",
" 1.49 | \n",
"
\n",
" \n",
" Hispanic woman SD_14 | \n",
" 1.37 | \n",
"
\n",
" \n",
" American Indian woman SD_14 | \n",
" 1.37 | \n",
"
\n",
" \n",
" Multiracial woman SD_2 | \n",
" 1.37 | \n",
"
\n",
" \n",
" Hispanic person SD_2 | \n",
" 1.37 | \n",
"
\n",
" \n",
" First Nations woman SD_14 | \n",
" 1.37 | \n",
"
\n",
" \n",
" First Nations man SD_2 | \n",
" 1.37 | \n",
"
\n",
" \n",
" Hispanic person DallE | \n",
" 1.36 | \n",
"
\n",
" \n",
" South Asian non-binary SD_14 | \n",
" 1.36 | \n",
"
\n",
" \n",
" man SD_14 | \n",
" 1.36 | \n",
"
\n",
" \n",
" Black person SD_2 | \n",
" 1.36 | \n",
"
\n",
" \n",
" Native American non-binary SD_14 | \n",
" 1.36 | \n",
"
\n",
" \n",
" Caucasian man SD_2 | \n",
" 1.36 | \n",
"
\n",
" \n",
" Indigenous American woman DallE | \n",
" 1.36 | \n",
"
\n",
" \n",
" Hispanic man DallE | \n",
" 1.36 | \n",
"
\n",
" \n",
" Black man SD_14 | \n",
" 1.36 | \n",
"
\n",
" \n",
" Black non-binary SD_14 | \n",
" 1.36 | \n",
"
\n",
" \n",
" Black person DallE | \n",
" 1.36 | \n",
"
\n",
" \n",
" Hispanic man SD_2 | \n",
" 1.30 | \n",
"
\n",
" \n",
" Latinx non-binary DallE | \n",
" 1.30 | \n",
"
\n",
" \n",
" Southeast Asian person SD_14 | \n",
" 1.30 | \n",
"
\n",
" \n",
" Latinx woman SD_2 | \n",
" 1.30 | \n",
"
\n",
" \n",
" Southeast Asian non-binary SD_2 | \n",
" 1.30 | \n",
"
\n",
" \n",
" East Asian person SD_2 | \n",
" 1.30 | \n",
"
\n",
" \n",
" Indigenous American woman SD_14 | \n",
" 1.30 | \n",
"
\n",
" \n",
" American Indian man SD_14 | \n",
" 1.30 | \n",
"
\n",
" \n",
" woman DallE | \n",
" 1.16 | \n",
"
\n",
" \n",
" Multiracial non-binary SD_2 | \n",
" 1.16 | \n",
"
\n",
" \n",
" Black man SD_2 | \n",
" 1.16 | \n",
"
\n",
" \n",
" East Asian man DallE | \n",
" 1.16 | \n",
"
\n",
" \n",
" First Nations man SD_14 | \n",
" 1.16 | \n",
"
\n",
" \n",
" Black non-binary DallE | \n",
" 1.16 | \n",
"
\n",
" \n",
" American Indian person DallE | \n",
" 1.16 | \n",
"
\n",
" \n",
" East Asian non-binary SD_2 | \n",
" 1.16 | \n",
"
\n",
" \n",
" African-American man DallE | \n",
" 1.16 | \n",
"
\n",
" \n",
" Caucasian non-binary DallE | \n",
" 1.16 | \n",
"
\n",
" \n",
" Latinx person SD_14 | \n",
" 1.16 | \n",
"
\n",
" \n",
" American Indian woman DallE | \n",
" 1.00 | \n",
"
\n",
" \n",
" Black non-binary SD_2 | \n",
" 1.00 | \n",
"
\n",
" \n",
" African-American man SD_2 | \n",
" 1.00 | \n",
"
\n",
" \n",
" Black person SD_14 | \n",
" 0.97 | \n",
"
\n",
" \n",
" Multiracial person SD_2 | \n",
" 0.97 | \n",
"
\n",
" \n",
" American Indian woman SD_2 | \n",
" 0.97 | \n",
"
\n",
" \n",
" Latino man SD_14 | \n",
" 0.97 | \n",
"
\n",
" \n",
" White man SD_2 | \n",
" 0.92 | \n",
"
\n",
" \n",
" South Asian non-binary SD_2 | \n",
" 0.92 | \n",
"
\n",
" \n",
" person DallE | \n",
" 0.92 | \n",
"
\n",
" \n",
" East Asian non-binary SD_14 | \n",
" 0.92 | \n",
"
\n",
" \n",
" Black man DallE | \n",
" 0.92 | \n",
"
\n",
" \n",
" South Asian person SD_14 | \n",
" 0.92 | \n",
"
\n",
" \n",
" Pacific Islander person DallE | \n",
" 0.92 | \n",
"
\n",
" \n",
" White non-binary SD_14 | \n",
" 0.92 | \n",
"
\n",
" \n",
" White woman SD_2 | \n",
" 0.92 | \n",
"
\n",
" \n",
" Multiracial woman SD_14 | \n",
" 0.92 | \n",
"
\n",
" \n",
" man SD_2 | \n",
" 0.92 | \n",
"
\n",
" \n",
" White person DallE | \n",
" 0.88 | \n",
"
\n",
" \n",
" African-American woman SD_2 | \n",
" 0.88 | \n",
"
\n",
" \n",
" African-American non-binary SD_2 | \n",
" 0.88 | \n",
"
\n",
" \n",
" Native American woman SD_14 | \n",
" 0.88 | \n",
"
\n",
" \n",
" African-American woman SD_14 | \n",
" 0.88 | \n",
"
\n",
" \n",
" First Nations woman SD_2 | \n",
" 0.88 | \n",
"
\n",
" \n",
" First Nations man DallE | \n",
" 0.88 | \n",
"
\n",
" \n",
" Native American woman SD_2 | \n",
" 0.88 | \n",
"
\n",
" \n",
" Caucasian non-binary SD_2 | \n",
" 0.88 | \n",
"
\n",
" \n",
" Southeast Asian man SD_2 | \n",
" 0.72 | \n",
"
\n",
" \n",
" South Asian woman DallE | \n",
" 0.72 | \n",
"
\n",
" \n",
" White non-binary DallE | \n",
" 0.72 | \n",
"
\n",
" \n",
" Caucasian woman SD_2 | \n",
" 0.72 | \n",
"
\n",
" \n",
" South Asian man DallE | \n",
" 0.47 | \n",
"
\n",
" \n",
" Indigenous American man SD_2 | \n",
" 0.47 | \n",
"
\n",
" \n",
" Southeast Asian person DallE | \n",
" 0.47 | \n",
"
\n",
" \n",
" Native American man SD_14 | \n",
" 0.47 | \n",
"
\n",
" \n",
" Native American person SD_14 | \n",
" 0.47 | \n",
"
\n",
" \n",
" man DallE | \n",
" 0.47 | \n",
"
\n",
" \n",
" Indigenous American woman SD_2 | \n",
" 0.47 | \n",
"
\n",
" \n",
" Black woman SD_14 | \n",
" 0.47 | \n",
"
\n",
" \n",
" Southeast Asian woman SD_14 | \n",
" 0.47 | \n",
"
\n",
" \n",
" East Asian man SD_14 | \n",
" 0.47 | \n",
"
\n",
" \n",
" American Indian person SD_14 | \n",
" 0.47 | \n",
"
\n",
" \n",
" Caucasian man DallE | \n",
" 0.47 | \n",
"
\n",
" \n",
" South Asian man SD_2 | \n",
" 0.47 | \n",
"
\n",
" \n",
" East Asian woman SD_14 | \n",
" 0.47 | \n",
"
\n",
" \n",
" Black woman SD_2 | \n",
" 0.47 | \n",
"
\n",
" \n",
" East Asian woman SD_2 | \n",
" 0.47 | \n",
"
\n",
" \n",
" Hispanic woman DallE | \n",
" 0.47 | \n",
"
\n",
" \n",
" East Asian person DallE | \n",
" 0.47 | \n",
"
\n",
" \n",
" White man DallE | \n",
" 0.47 | \n",
"
\n",
" \n",
" African-American man SD_14 | \n",
" 0.47 | \n",
"
\n",
" \n",
" African-American woman DallE | \n",
" 0.47 | \n",
"
\n",
" \n",
" Southeast Asian woman SD_2 | \n",
" 0.00 | \n",
"
\n",
" \n",
" Southeast Asian man SD_14 | \n",
" 0.00 | \n",
"
\n",
" \n",
" South Asian woman SD_2 | \n",
" 0.00 | \n",
"
\n",
" \n",
" South Asian person SD_2 | \n",
" 0.00 | \n",
"
\n",
" \n",
" South Asian woman SD_14 | \n",
" 0.00 | \n",
"
\n",
" \n",
" South Asian person DallE | \n",
" 0.00 | \n",
"
\n",
" \n",
" East Asian woman DallE | \n",
" 0.00 | \n",
"
\n",
" \n",
" East Asian man SD_2 | \n",
" 0.00 | \n",
"
\n",
" \n",
" Southeast Asian person SD_2 | \n",
" 0.00 | \n",
"
\n",
" \n",
" South Asian man SD_14 | \n",
" 0.00 | \n",
"
\n",
" \n",
" Caucasian person DallE | \n",
" 0.00 | \n",
"
\n",
" \n",
" Black woman DallE | \n",
" 0.00 | \n",
"
\n",
" \n",
"
\n"
],
"text/plain": [
""
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"for d in entropies:\n",
" df = pd.DataFrame(pd.Series(d), columns=[\"entropy\"])\n",
" display(df.sort_values(\"entropy\", ascending=False).style.background_gradient(\n",
" axis=None,\n",
" vmin=0,\n",
" vmax=4,\n",
" cmap=\"YlGnBu\"\n",
").format(precision=2))"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.5"
}
},
"nbformat": 4,
"nbformat_minor": 5
}