<jupyter_start><jupyter_text>FacebookInfluentials analysis for Facebook data.<jupyter_code>facebook = nx.read_edgelist("Data/facebook.txt")
print(nx.info(facebook))
%%time
pool = []
for phi in tqdm(phis):
    pool.append(dask.delayed(run_simulation)(facebook, phi=phi,  directed=False))

results_facebook = dask.compute(pool)<jupyter_output>100%|██████████| 6/6 [00:00<00:00, 2427.26it/s]<jupyter_text>Analysis<jupyter_code>## Preload Data
#file_dir = "./Results"
# fb_fn_phi = "facebook_phi.npy"
# fb_fn_q = "facebook_q.npy"
# fb = np.load(os.path.join(file_dir, fb_fn_phi))
# fb_q = np.load(os.path.join(file_dir, fb_fn_q))
fb = np.array(results_facebook[0])
plt.plot(phis, fb[:,0])
plt.plot(phis, fb[:,1])
plt.plot(phis, fb[:,2])
plt.plot(phis, fb[:,3])
plt.plot(phis, fb[:,4])
plt.plot(phis, fb[:,5])
plt.plot(phis, fb[:,6])
plt.plot(phis, fb[:,7])
plt.plot(phis, fb[:,8])
plt.ylabel("Average Number Influenced")
plt.xlabel("Threshold Value (phi)")
plt.title("Number of Nodes Influenced against Threshold Value")
plt.legend(names)
plt.plot(phis, fb[:,9])
plt.plot(phis, fb[:,10])
plt.plot(phis, fb[:,11])
plt.plot(phis, fb[:,12])
plt.plot(phis, fb[:,13])
plt.plot(phis, fb[:,14])
plt.plot(phis, fb[:,15])
plt.plot(phis, fb[:,16])
plt.plot(phis, fb[:,17])
plt.ylabel("Average Time of Influenced")
plt.xlabel("Threshold Value (phi)")
plt.title("Comparison of Average Influenced Time against Threshold Value")
plt.legend(names)
file_dir = "./Results"
fb_fn = "facebook.npy"

if not os.path.exists(file_dir):
    os.makedirs(file_dir)
np.save(os.path.join(file_dir, fb_fn), fb)<jupyter_output><empty_output><jupyter_text>AdvogatoInfluentials analysis for Advogato data.<jupyter_code>advogato = nx.read_edgelist("Data/soc-advogato.edges", data=(('weight',float),))
print(nx.info(advogato))
%%time
pool = []
for phi in tqdm(phis):
    pool.append(dask.delayed(run_simulation)(advogato, phi=phi,  directed=False))

results_advogato = dask.compute(pool)<jupyter_output>100%|██████████| 6/6 [00:00<00:00, 2923.54it/s]<jupyter_text>Analysis<jupyter_code>av = np.array(results_advogato[0])
plt.plot(phis, av[:,0])
plt.plot(phis, av[:,1])
plt.plot(phis, av[:,2])
plt.plot(phis, av[:,3])
plt.plot(phis, av[:,4])
plt.plot(phis, av[:,5])
plt.plot(phis, av[:,6])
plt.plot(phis, av[:,7])
plt.plot(phis, av[:,8])
plt.ylabel("Average Number Influenced")
plt.xlabel("Threshold Value (phi)")
plt.title("Number of Nodes Influenced against Threshold Value")
plt.legend(names)
plt.plot(phis, av[:,9])
plt.plot(phis, av[:,10])
plt.plot(phis, av[:,11])
plt.plot(phis, av[:,12])
plt.plot(phis, av[:,13])
plt.plot(phis, av[:,14])
plt.plot(phis, av[:,15])
plt.plot(phis, av[:,16])
plt.plot(phis, av[:,17])
plt.ylabel("Average Time of Influenced")
plt.xlabel("Threshold Value (phi)")
plt.title("Comparison of Average Influenced Time against Threshold Value")
plt.legend(names)
file_dir = "./Results"
av_fn = "advogato.npy"

if not os.path.exists(file_dir):
    os.makedirs(file_dir)
np.save(os.path.join(file_dir, av_fn), av)<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.20831957741828985, 'fraction_numerical': 0.03037306041597887, 'mean_word_length': 7.347107438016529, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '4', 'dir': 'jupyter-structured-clean-dedup', 'id': '653966', 'license': 'MIT', 'n_tokens_mistral': 1400, 'n_tokens_neox': 1250, 'n_words': 213, 'path': 'Code/Simulation_Data.ipynb', 'repo_name': 'MiLinny/Influentials', 'size': '3029'}