<jupyter_start><jupyter_text>Different types of network exhibit different correlations among the eight patterns- In trust network (BTCAlpha), we observe high correlations among the four closure patterns, or among the four clustering patterns; In contrast, the correlations between the closure patterns and the clustering patterns are very low.- In word ajacency network (French), we only find high correlations among the four closure patterns.- In web graph (Google), there are also relatively high correlations among the four closure patterns (except between closure-head and closure-end)- In food web (BayDry), citation network (HepTh) and software network (JDK), high correlations among the eight patterns are rare, such as the correlation between closure-cyc and clustering-cyc.<jupyter_code># onepic, axes = plt.subplots(4,6,figsize=(19,10), sharex=True, sharey=True)
# plt.subplots_adjust(hspace=0.15, wspace=.15)
# # add only one color bar for all subplots
# cbar_ax = onepic.add_axes([.9, .07, .022, .89])

# sns.heatmap(alpha.corr(), ax=axes[0][0], cbar=True, cbar_ax=cbar_ax, cmap="Blues")
# axes[0, 0].set_title("Tr-BTCAlpha", fontsize=16)
# sns.heatmap(otc.corr(), ax=axes[0][1], cbar=False, cmap="Blues")
# axes[0, 1].set_title("Tr-BTC-OTC", fontsize=16)
# sns.heatmap(advogato.corr(), ax=axes[0][2], cbar=False, cmap="Blues")
# axes[0, 2].set_title("Tr-Advogato", fontsize=16)
# sns.heatmap(epinions.corr(), ax=axes[0][3], cbar=False, cmap="Blues")
# axes[0, 3].set_title("Tr-Epinions", fontsize=16)

# sns.heatmap(mang.corr(), ax=axes[0][4], cbar=False, cmap="Blues")
# axes[0, 4].set_title("FW-Mangrove", fontsize=16)
# sns.heatmap(baywet.corr(), ax=axes[0][5], cbar=False, cmap="Blues")
# axes[0, 5].set_title("FW-BayWet", fontsize=16)
# sns.heatmap(baydry.corr(), ax=axes[1][0], cbar=False, cmap="Blues")
# axes[1, 0].set_title("FW-BayDry", fontsize=16)
# sns.heatmap(littlerock.corr(), ax=axes[1][1], cbar=False, cmap="Blues")
# axes[1, 1].set_title("FW-LittleRock", fontsize=16)

# sns.heatmap(cora.corr(), ax=axes[1][2], cbar=False, cmap="Blues")
# axes[1, 2].set_title("Cit-Cora", fontsize=16)
# sns.heatmap(hepth.corr(), ax=axes[1][3], cbar=False, cmap="Blues")
# axes[1, 3].set_title("Cit-HepTh", fontsize=16)
# sns.heatmap(hepph.corr(), ax=axes[1][4], cbar=False, cmap="Blues")
# axes[1, 4].set_title("Cit-HepPh", fontsize=16)
# sns.heatmap(citeseer.corr(), ax=axes[1][5], cbar=False, cmap="Blues")
# axes[1, 5].set_title("Cit-Citeseer", fontsize=16)

# sns.heatmap(weka.corr(), ax=axes[2][0], cbar=False, cmap="Blues")
# axes[2, 0].set_title("SW-Weka", fontsize=16)
# sns.heatmap(lucene.corr(), ax=axes[2][1], cbar=False, cmap="Blues")
# axes[2, 1].set_title("SW-Lucene", fontsize=16)
# sns.heatmap(jung.corr(), ax=axes[2][2], cbar=False, cmap="Blues")
# axes[2, 2].set_title("SW-JUNG", fontsize=16)
# sns.heatmap(jdk.corr(), ax=axes[2][3], cbar=False, cmap="Blues")
# axes[2, 3].set_title("SW-JDK", fontsize=16)

# sns.heatmap(stanford.corr(), ax=axes[2][4], cbar=False, cmap="Blues")
# axes[2, 4].set_title("Web-Stanford", fontsize=16)
# sns.heatmap(notredame.corr(), ax=axes[2][5], cbar=False, cmap="Blues")
# axes[2, 5].set_title("Web-NotreDame", fontsize=16)
# sns.heatmap(berkstan.corr(), ax=axes[3][0], cbar=False, cmap="Blues")
# axes[3, 0].set_title("Web-BerkStan", fontsize=16)
# sns.heatmap(google.corr(), ax=axes[3][1], cbar=False, cmap="Blues")
# axes[3, 1].set_title("Web-Google", fontsize=16)

# sns.heatmap(japan.corr(), ax=axes[3][2], cbar=False, cmap="Blues")
# axes[3, 2].set_title("WA-Japanese", fontsize=16)
# sns.heatmap(darwin.corr(), ax=axes[3][3], cbar=False, cmap="Blues")
# axes[3, 3].set_title("WA-NotreDame", fontsize=16)
# sns.heatmap(french.corr(), ax=axes[3][4], cbar=False, cmap="Blues")
# axes[3, 4].set_title("WA-French", fontsize=16)
# sns.heatmap(spanish.corr(), ax=axes[3][5], cbar=False, cmap="Blues")
# axes[3, 5].set_title("WA-Spanish", fontsize=16)

# onepic.tight_layout(rect=[0, 0, 0.9, 1])
# plt.savefig('heatmap_all.pdf')
onepic, axes = plt.subplots(6,4,figsize=(11.3,12.3), sharex=True, sharey=True)
plt.subplots_adjust(hspace=0.15, wspace=.15)
# add only one color bar for all subplots
# left, bottom, width, height
cbar_ax = onepic.add_axes([.9, .086, .02, .881])

sns.heatmap(alpha.corr(), ax=axes[0][0], cbar=True, cbar_ax=cbar_ax, cmap="coolwarm")
axes[0, 0].set_title("Tr-BTCAlpha", fontsize=16)
axes[0, 0].tick_params('y', labelsize=16)
sns.heatmap(otc.corr(), ax=axes[0][1], cbar=False, cmap="coolwarm")
axes[0, 1].set_title("Tr-BTC-OTC", fontsize=16)
sns.heatmap(advogato.corr(), ax=axes[0][2], cbar=False, cmap="coolwarm")
axes[0, 2].set_title("Tr-Advogato", fontsize=16)
sns.heatmap(epinions.corr(), ax=axes[0][3], cbar=False, cmap="coolwarm")
axes[0, 3].set_title("Tr-Epinions", fontsize=16)

sns.heatmap(mang.corr(), ax=axes[1][0], cbar=False, cmap="coolwarm")
axes[1, 0].set_title("FW-Mangrove", fontsize=16)
axes[1, 0].tick_params('y', labelsize=16)
sns.heatmap(baywet.corr(), ax=axes[1][1], cbar=False, cmap="coolwarm")
axes[1, 1].set_title("FW-BayWet", fontsize=16)
sns.heatmap(baydry.corr(), ax=axes[1][2], cbar=False, cmap="coolwarm")
axes[1, 2].set_title("FW-BayDry", fontsize=16)
sns.heatmap(littlerock.corr(), ax=axes[1][3], cbar=False, cmap="coolwarm")
axes[1, 3].set_title("FW-LittleRock", fontsize=16)

sns.heatmap(cora.corr(), ax=axes[2][0], cbar=False, cmap="coolwarm")
axes[2, 0].set_title("Cit-Cora", fontsize=16)
axes[2, 0].tick_params('y', labelsize=16)
sns.heatmap(hepth.corr(), ax=axes[2][1], cbar=False, cmap="coolwarm")
axes[2, 1].set_title("Cit-HepTh", fontsize=16)
sns.heatmap(hepph.corr(), ax=axes[2][2], cbar=False, cmap="coolwarm")
axes[2, 2].set_title("Cit-HepPh", fontsize=16)
sns.heatmap(citeseer.corr(), ax=axes[2][3], cbar=False, cmap="coolwarm")
axes[2, 3].set_title("Cit-Citeseer", fontsize=16)

sns.heatmap(weka.corr(), ax=axes[3][0], cbar=False, cmap="coolwarm")
axes[3, 0].set_title("SW-Weka", fontsize=16)
axes[3, 0].tick_params('y', labelsize=16)
sns.heatmap(lucene.corr(), ax=axes[3][1], cbar=False, cmap="coolwarm")
axes[3, 1].set_title("SW-Lucene", fontsize=16)
sns.heatmap(jung.corr(), ax=axes[3][2], cbar=False, cmap="coolwarm")
axes[3, 2].set_title("SW-JUNG", fontsize=16)
sns.heatmap(jdk.corr(), ax=axes[3][3], cbar=False, cmap="coolwarm")
axes[3, 3].set_title("SW-JDK", fontsize=16)

sns.heatmap(stanford.corr(), ax=axes[4][0], cbar=False, cmap="coolwarm")
axes[4, 0].set_title("Web-Stanford", fontsize=16)
axes[4, 0].tick_params('y', labelsize=16)
sns.heatmap(notredame.corr(), ax=axes[4][1], cbar=False, cmap="coolwarm")
axes[4, 1].set_title("Web-NotreDame", fontsize=16)
sns.heatmap(berkstan.corr(), ax=axes[4][2], cbar=False, cmap="coolwarm")
axes[4, 2].set_title("Web-BerkStan", fontsize=16)
sns.heatmap(google.corr(), ax=axes[4][3], cbar=False, cmap="coolwarm")
axes[4, 3].set_title("Web-Google", fontsize=16)

sns.heatmap(japan.corr(), ax=axes[5][0], cbar=False, cmap="coolwarm")
axes[5, 0].set_title("WA-Japanese", fontsize=16)
axes[5, 0].tick_params('x', labelsize=16)
axes[5, 0].tick_params('y', labelsize=16)
sns.heatmap(darwin.corr(), ax=axes[5][1], cbar=False, cmap="coolwarm")
axes[5, 1].set_title("WA-NotreDame", fontsize=16)
axes[5, 1].tick_params('x', labelsize=16)
sns.heatmap(french.corr(), ax=axes[5][2], cbar=False, cmap="coolwarm")
axes[5, 2].set_title("WA-French", fontsize=16)
axes[5, 2].tick_params('x', labelsize=16)
sns.heatmap(spanish.corr(), ax=axes[5][3], cbar=False, cmap="coolwarm")
axes[5, 3].set_title("WA-Spanish", fontsize=16)
axes[5, 3].tick_params('x', labelsize=16)

onepic.tight_layout(rect=[0, 0, 0.9, 1])
plt.savefig('heatmap_all.pdf')<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.22356020942408378, 'fraction_numerical': 0.04960732984293194, 'mean_word_length': 8.03191489361702, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '170869', 'license': 'BSD-3-Clause', 'n_tokens_mistral': 3710, 'n_tokens_neox': 3242, 'n_words': 529, 'path': 'experiment_for_di-clo/heatmap_eight_patterns.ipynb', 'repo_name': 'MingshanJia/networkx', 'size': '7640'}