<jupyter_start><jupyter_text>networkx implementation vs mine  m = 8, N = 10^5<jupyter_code>m, N = 8, 10**5
g0 = nx.barabasi_albert_graph(N, m)
filepath = "data/ba/deg_dist1/{0}_{1}.txt".format(N, m)
with open(filepath, 'r') as f:
    g1_raw = f.read().split(",")
    g1_raw = [int(x) for x in g1_raw]
g0_degrees = pd.DataFrame(g0.degree(), index=['g0']).T
g1_degrees = pd.DataFrame(g1_raw, index=range(len(g1_raw)), columns=['g1'])
degrees_df = pd.concat([g0_degrees, g1_degrees], axis=1)
# plot to check
current_palette = sns.color_palette()
labels = {'g0': "Networkx implementation", "g1": "My implementation"}
for col in degrees_df:
    if col == 'g0':
        alpha = 0.8
        color = current_palette[2]
    else:
        alpha = 0.9
        color = current_palette[0]
    degrees_df[col].value_counts().plot(marker='o', linestyle="None", loglog=True, label=labels[col], alpha=alpha, color=color)
plt.legend()<jupyter_output><empty_output><jupyter_text>They align well.   m = 16, N = 10^5<jupyter_code>m, N = 16, 10**5
g0 = nx.barabasi_albert_graph(N, m)
filepath = "data/ba/deg_dist1/{0}_{1}.txt".format(N, m)
with open(filepath, 'r') as f:
    g1_raw = f.read().split(",")
    g1_raw = [int(x) for x in g1_raw]
g0_degrees = pd.DataFrame(g0.degree(), index=['g0']).T
g1_degrees = pd.DataFrame(g1_raw, index=range(len(g1_raw)), columns=['g1'])
degrees_df = pd.concat([g0_degrees, g1_degrees], axis=1)
# plot to check
current_palette = sns.color_palette()
labels = {'g0': "Networkx implementation", "g1": "My implementation"}
for col in degrees_df:
    if col == 'g0':
        alpha = 0.8
        color = current_palette[2]
    else:
        alpha = 0.9
        color = current_palette[0]
    degrees_df[col].value_counts().plot(marker='o', linestyle="None", loglog=True, label=labels[col], alpha=alpha, color=color)
plt.legend()<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.1742627345844504, 'fraction_numerical': 0.03753351206434316, 'mean_word_length': 4.620481927710843, 'pattern_counts': {'":': 2, '<': 9, '<?xml version=': 0, '>': 9, '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': '2', 'dir': 'jupyter-structured-clean-dedup', 'id': '616642', 'license': 'MIT', 'n_tokens_mistral': 776, 'n_tokens_neox': 757, 'n_words': 150, 'path': 'testing-the-model.ipynb', 'repo_name': 'lingxz/networks', 'size': '1865'}