<jupyter_start><jupyter_text>Compare sampling ratios<jupyter_code>LADIES = np.load('test_accuracy_list_reddit_LADIES.npy')[0:25]
LADIES_20 = np.load('test_accuracy_list_reddit_LADIES_active_laplacian_ratio0.2.npy')[0:100]
LADIES_10 = np.load('test_accuracy_list_reddit_LADIES_active_laplacian_ratio0.1.npy')
LADIES_5 = np.load('test_accuracy_list_reddit_LADIES_active_laplacian_ratio0.05.npy')
num_batch = int(153431/256+1)
plt.plot(np.arange(1, len(LADIES)+1)*num_batch, LADIES, linestyle = '--', label = 'Standard')
plt.plot(np.arange(1, len(LADIES_20)+1)*int(num_batch*0.2), LADIES_20, linestyle = ':', label = 'Laplacian, ratio=0.2')
plt.plot(np.arange(1, len(LADIES_10)+1)*int(num_batch*0.1), LADIES_10, linestyle = '-', label = 'Laplacian, ratio=0.1')
plt.plot(np.arange(1, len(LADIES_5)+1)*int(num_batch*0.05), LADIES_5, label = 'Laplacian, ratio=0.05')

plt.ylim([0.7, 0.93])
plt.xlim([-100,10000])
plt.title('Reddit, Laplacian Sampling', fontsize = 16)
plt.xlabel('Number of Iterations', fontsize = 14)
plt.ylabel('Accuracy', fontsize = 14)
plt.legend(fontsize = 14)
# plt.savefig('../Figure/Pubmed_accuracy_active_sampling_ratio_comparison_laplacian.png')
plt.show()
LADIES = np.load('test_accuracy_list_pubmed_LADIES.npy')[0:300]
LADIES_50 = np.load('test_accuracy_list_pubmed_LADIES_active_laplacian_ratio0.5.npy')
LADIES_20 = np.load('test_accuracy_list_pubmed_LADIES_active_laplacian_ratio0.2.npy')
LADIES_10 = np.load('test_accuracy_list_pubmed_LADIES_active_laplacian_ratio0.1.npy')
LADIES_5 = np.load('test_accuracy_list_pubmed_LADIES_active_laplacian_ratio0.05.npy')
num_batch = int(18717/256+1)
plt.plot(np.arange(len(LADIES))*num_batch, LADIES, linestyle = '--', label = 'Standard')
plt.plot(np.arange(len(LADIES_50))*int(num_batch*0.5), LADIES_50, linestyle = '-.', label = 'Laplacian, ratio=0.5')
plt.plot(np.arange(len(LADIES_20))*int(num_batch*0.2), LADIES_20, linestyle = ':', label = 'Laplacian, ratio=0.2')
plt.plot(np.arange(len(LADIES_10))*int(num_batch*0.1), LADIES_10, linestyle = '-', label = 'Laplacian, ratio=0.1')
plt.plot(np.arange(len(LADIES_5))*int(num_batch*0.05), LADIES_5, label = 'Laplacian, ratio=0.05')

plt.ylim([0.7, 0.92])
plt.xlim([-100,3000])
plt.title('Pubmed, Laplacian Sampling', fontsize = 16)
plt.xlabel('Number of Iterations', fontsize = 14)
plt.ylabel('Accuracy', fontsize = 14)
plt.legend(fontsize = 14)
plt.savefig('../Figure/Pubmed_accuracy_active_sampling_ratio_comparison_laplacian.png')
plt.show()<jupyter_output><empty_output><jupyter_text>Compare sampling methods<jupyter_code>LADIES = np.load('test_accuracy_list_ogbn_arxiv_LADIES.npy')[0:25]
LADIES_random_10 = np.load('test_accuracy_list_ogbn_arxiv_LADIES_active_random_ratio0.05.npy')
LADIES_laplacian_10 = np.load('test_accuracy_list_ogbn_arxiv_LADIES_active_laplacian_ratio0.05.npy')
LADIES_degree_10 = np.load('test_accuracy_list_ogbn_arxiv_LADIES_active_degree_ratio0.05.npy')
num_batch = int(90941/256+1)
plt.plot(np.arange(1, len(LADIES)+1)*num_batch, LADIES, linestyle = '--', label = 'Standard')
plt.plot(np.arange(1, len(LADIES_random_10)+1)*int(num_batch*0.05), LADIES_random_10, linestyle = '-.', label = 'Random')
plt.plot(np.arange(1, len(LADIES_laplacian_10)+1)*int(num_batch*0.05), LADIES_laplacian_10, linestyle = ':', label = 'Laplacian')
plt.plot(np.arange(1, len(LADIES_degree_10)+1)*int(num_batch*0.05), LADIES_degree_10, linestyle = '-', label = 'Degree')

plt.title('ogbn-arxiv, ratio = 0.05', fontsize = 16)
plt.xlabel('Number of Iterations', fontsize = 14)
plt.ylabel('Accuracy', fontsize = 14)
plt.legend(fontsize = 14)
plt.ylim([0.2, 0.65])
plt.xlim([-200,5000])
# plt.savefig('../Figure/Reddit_accuracy_active_sampling_method_comparison_ratio_0.2.png')
plt.show()
LADIES = np.load('test_accuracy_list_ogbn_arxiv_LADIES.npy')[0:25]
LADIES_random_10 = np.load('test_accuracy_list_ogbn_arxiv_LADIES_active_random_ratio0.01.npy')
LADIES_laplacian_10 = np.load('test_accuracy_list_ogbn_arxiv_LADIES_active_laplacian_ratio0.01.npy')
LADIES_degree_10 = np.load('test_accuracy_list_ogbn_arxiv_LADIES_active_degree_ratio0.01.npy')
num_batch = int(90941/256+1)
plt.plot(np.arange(1, len(LADIES)+1)*num_batch, LADIES, linestyle = '--', label = 'Standard')
plt.plot(np.arange(1, len(LADIES_random_10)+1)*int(num_batch*0.01), LADIES_random_10, linestyle = '-.', label = 'Random')
plt.plot(np.arange(1, len(LADIES_laplacian_10)+1)*int(num_batch*0.01), LADIES_laplacian_10, linestyle = ':', label = 'Laplacian')
plt.plot(np.arange(1, len(LADIES_degree_10)+1)*int(num_batch*0.01), LADIES_degree_10, linestyle = '-', label = 'Degree')

plt.title('ogbn-arxiv, ratio = 0.01', fontsize = 16)
plt.xlabel('Number of Iterations', fontsize = 14)
plt.ylabel('Accuracy', fontsize = 14)
plt.legend(fontsize = 14)
plt.ylim([0.2, 0.65])
plt.xlim([-200,5000])
# plt.savefig('../Figure/Reddit_accuracy_active_sampling_method_comparison_ratio_0.2.png')
plt.show()
LADIES = np.load('test_accuracy_list_reddit_LADIES.npy')[0:25]
LADIES_random_10 = np.load('test_accuracy_list_reddit_LADIES_active_random_ratio0.1.npy')
LADIES_laplacian_10 = np.load('test_accuracy_list_reddit_LADIES_active_laplacian_ratio0.1.npy')
LADIES_degree_10 = np.load('test_accuracy_list_reddit_LADIES_active_degree_ratio0.1.npy')
num_batch = int(153431/256+1)
plt.plot(np.arange(1, len(LADIES)+1)*num_batch, LADIES, linestyle = '--', label = 'Standard')
plt.plot(np.arange(1, len(LADIES_random_10)+1)*int(num_batch*0.1), LADIES_random_10, linestyle = '-.', label = 'Random')
plt.plot(np.arange(1, len(LADIES_laplacian_10)+1)*int(num_batch*0.1), LADIES_laplacian_10, linestyle = ':', label = 'Laplacian')
plt.plot(np.arange(1, len(LADIES_degree_10)+1)*int(num_batch*0.1), LADIES_degree_10, linestyle = '-', label = 'Degree')

plt.title('Reddit, ratio = 0.1', fontsize = 16)
plt.xlabel('Number of Iterations', fontsize = 14)
plt.ylabel('Accuracy', fontsize = 14)
plt.legend(fontsize = 14)
plt.ylim([0.7, 0.91])
plt.xlim([-200,10000])
# plt.savefig('../Figure/Reddit_accuracy_active_sampling_method_comparison_ratio_0.2.png')
plt.show()
LADIES = np.load('test_accuracy_list_pubmed_LADIES.npy')
LADIES_random_10 = np.load('test_accuracy_list_pubmed_LADIES_active_random_ratio0.1.npy')
LADIES_laplacian_10 = np.load('test_accuracy_list_pubmed_LADIES_active_laplacian_ratio0.1.npy')
LADIES_degree_10 = np.load('test_accuracy_list_pubmed_LADIES_active_degree_ratio0.1.npy')
num_batch = int(18717/256+1)
plt.plot(np.arange(1, len(LADIES)+1)*num_batch, LADIES, linestyle = '--', label = 'Standard')
plt.plot(np.arange(1, len(LADIES_random_10)+1)*int(num_batch*0.1), LADIES_random_10, linestyle = '-.', label = 'Random')
plt.plot(np.arange(1, len(LADIES_laplacian_10)+1)*int(num_batch*0.1), LADIES_laplacian_10, linestyle = ':', label = 'Laplacian')
plt.plot(np.arange(1, len(LADIES_degree_10)+1)*int(num_batch*0.1), LADIES_degree_10, linestyle = '-', label = 'Degree')

plt.title('Pubmed, ratio = 0.1', fontsize = 16)
plt.xlabel('Number of Iterations', fontsize = 14)
plt.ylabel('Accuracy', fontsize = 14)
plt.legend(fontsize = 14)
plt.ylim([0.6, 0.9])
plt.xlim([-50,2000])
plt.savefig('../Figure/Pubmed_accuracy_active_sampling_method_comparison_ratio_0.2.png')
plt.show()
LADIES = np.load('test_accuracy_list_pubmed_LADIES.npy')
LADIES_random_10 = np.load('test_accuracy_list_pubmed_LADIES_active_random_ratio0.1.npy')
LADIES_laplacian_10 = np.load('test_accuracy_list_pubmed_LADIES_active_laplacian_ratio0.1.npy')
LADIES_degree_10 = np.load('test_accuracy_list_pubmed_LADIES_active_degree_ratio0.1.npy')
num_batch = int(18717/256+1)
plt.plot(np.arange(len(LADIES))*num_batch, LADIES, linestyle = '--', label = 'LADIES')
plt.plot(np.arange(len(LADIES_random_10))*int(num_batch*0.1), LADIES_random_10, linestyle = '-.', label = 'LADIES, random')
plt.plot(np.arange(len(LADIES_laplacian_10))*int(num_batch*0.1), LADIES_laplacian_10, linestyle = ':', label = 'LADIES, laplacian')
plt.plot(np.arange(len(LADIES_degree_10))*int(num_batch*0.1), LADIES_degree_10, linestyle = '-', label = 'LADIES, degree')

plt.title('Pubmed, ratio = 0.1', fontsize = 16)
plt.xlabel('Number of Iterations', fontsize = 14)
plt.ylabel('Accuracy', fontsize = 14)
plt.legend(fontsize = 14)
plt.ylim([0.7, 0.9])
plt.xlim([-300,10000])
plt.savefig('../Figure/Pubmed_accuracy_active_sampling_method_comparison_ratio_0.1.png')
plt.show()
LADIES = np.load('test_accuracy_list_citeseer_LADIES.npy')
LADIES_random_40 = np.load('test_accuracy_list_citeseer_LADIES_active_random_ratio0.4.npy')
LADIES_laplacian_40 = np.load('test_accuracy_list_citeseer_LADIES_active_laplacian_ratio0.4.npy')
LADIES_degree_40 = np.load('test_accuracy_list_citeseer_LADIES_active_degree_ratio0.4.npy')
num_batch = int(2312/256+1)
plt.plot(np.arange(len(LADIES))*num_batch, LADIES, linestyle = '--', label = 'LADIES')
plt.plot(np.arange(len(LADIES_random_40))*int(num_batch*0.4), LADIES_random_40, linestyle = '-.', label = 'LADIES, random')
plt.plot(np.arange(len(LADIES_laplacian_40))*int(num_batch*0.4), LADIES_laplacian_40, linestyle = ':', label = 'LADIES, laplacian')
plt.plot(np.arange(len(LADIES_degree_40))*int(num_batch*0.4), LADIES_degree_40, linestyle = '-', label = 'LADIES, degree')

plt.title('Citeseer, ratio = 0.4', fontsize = 16)
plt.xlabel('Number of Iterations', fontsize = 14)
plt.ylabel('Accuracy', fontsize = 14)
plt.legend(fontsize = 14)
plt.ylim([0.6, 0.8])
plt.xlim([-50,1000])
plt.savefig('../Figure/Citeseer_accuracy_active_sampling_method_comparison_ratio_0.4.png')
plt.show()
LADIES = np.load('test_accuracy_list_citeseer_LADIES.npy')
LADIES_random_20 = np.load('test_accuracy_list_citeseer_LADIES_active_random_ratio0.2.npy')
LADIES_laplacian_20 = np.load('test_accuracy_list_citeseer_LADIES_active_laplacian_ratio0.2.npy')
LADIES_degree_20 = np.load('test_accuracy_list_citeseer_LADIES_active_degree_ratio0.2.npy')
num_batch = int(2312/256+1)
plt.plot(np.arange(len(LADIES))*num_batch, LADIES, linestyle = '--', label = 'LADIES')
plt.plot(np.arange(len(LADIES_random_20))*int(num_batch*0.2), LADIES_random_20, linestyle = '-.', label = 'LADIES, random')
plt.plot(np.arange(len(LADIES_laplacian_20))*int(num_batch*0.2), LADIES_laplacian_20, linestyle = ':', label = 'LADIES, laplacian')
plt.plot(np.arange(len(LADIES_degree_20))*int(num_batch*0.2), LADIES_degree_20, linestyle = '-', label = 'LADIES, degree')

plt.title('Citeseer, ratio = 0.2', fontsize = 16)
plt.xlabel('Number of Iterations', fontsize = 14)
plt.ylabel('Accuracy', fontsize = 14)
plt.legend(fontsize = 14)
plt.ylim([0.6, 0.8])
plt.xlim([-50,1000])
plt.savefig('../Figure/Citeseer_accuracy_active_sampling_method_comparison_ratio_0.2.png')
plt.show()<jupyter_output><empty_output><jupyter_text>Incorporate neighbor elimination<jupyter_code>LADIES_laplacian_20 = np.load('test_accuracy_list_pubmed_LADIES_active_laplacian_ratio0.2.npy')
LADIES_degree_20 = np.load('test_accuracy_list_pubmed_LADIES_active_degree_ratio0.2.npy')
LADIES_laplacian_cluster_20 = np.load('test_accuracy_list_pubmed_LADIES_active_laplacian_cluster_ratio0.2.npy')
LADIES_degree_cluster_20 = np.load('test_accuracy_list_pubmed_LADIES_active_degree_cluster_ratio0.2.npy')
num_batch = int(18717/256+1)
plt.plot(np.arange(len(LADIES_laplacian_20))*int(num_batch*0.2), LADIES_laplacian_20, linestyle = ':', color = 'blue', label = 'Laplacian')
plt.plot(np.arange(len(LADIES_degree_20))*int(num_batch*0.2), LADIES_degree_20, linestyle = ':', color ='orange',  label = 'Degree')
plt.plot(np.arange(len(LADIES_laplacian_cluster_20))*int(num_batch*0.2), LADIES_laplacian_cluster_20, color = 'blue', label = 'Laplacian, exclude neighbors')
plt.plot(np.arange(len(LADIES_degree_cluster_20))*int(num_batch*0.2), LADIES_degree_cluster_20, color='orange', label = 'Degree, exclude neighbors')

plt.title('Pubmed, ratio = 0.2', fontsize = 16)
plt.xlabel('Number of Iterations', fontsize = 14)
plt.ylabel('Accuracy', fontsize = 14)
plt.legend(fontsize = 14)
plt.ylim([0.7, 0.9])
plt.xlim([-300,9000])
plt.savefig('../Figure/Pubmed_accuracy_active_cluster_vs_no_cluster_ratio_0.2.png')
plt.show()
LADIES_laplacian_10 = np.load('test_accuracy_list_pubmed_LADIES_active_laplacian_ratio0.1.npy')
LADIES_degree_10 = np.load('test_accuracy_list_pubmed_LADIES_active_degree_ratio0.1.npy')
LADIES_laplacian_cluster_10 = np.load('test_accuracy_list_pubmed_LADIES_active_laplacian_cluster_ratio0.1.npy')
LADIES_degree_cluster_10 = np.load('test_accuracy_list_pubmed_LADIES_active_degree_cluster_ratio0.1.npy')
num_batch = int(18717/256+1)
plt.plot(np.arange(len(LADIES_laplacian_10))*int(num_batch*0.1), LADIES_laplacian_10, linestyle = ':', color = 'blue', label = 'Laplacian')
plt.plot(np.arange(len(LADIES_degree_10))*int(num_batch*0.1), LADIES_degree_10, linestyle = ':', color ='orange',  label = 'Degree')
plt.plot(np.arange(len(LADIES_laplacian_cluster_10))*int(num_batch*0.1), LADIES_laplacian_cluster_10, color = 'blue', label = 'Laplacian, exclude neighbors')
plt.plot(np.arange(len(LADIES_degree_cluster_10))*int(num_batch*0.1), LADIES_degree_cluster_10, color='orange', label = 'Degree, exclude neighbors')

plt.title('Pubmed, ratio = 0.1', fontsize = 16)
plt.xlabel('Number of Iterations', fontsize = 14)
plt.ylabel('Accuracy', fontsize = 14)
plt.legend(fontsize = 14)
plt.ylim([0.7, 0.9])
plt.xlim([-300,4500])
plt.savefig('../Figure/Pubmed_accuracy_active_cluster_vs_no_cluster_ratio_0.1.png')
plt.show()<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.16283783783783784, 'fraction_numerical': 0.05983483483483484, 'mean_word_length': 8.688, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, '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': '3', 'dir': 'jupyter-structured-clean-dedup', 'id': '580770', 'license': 'MIT', 'n_tokens_mistral': 6331, 'n_tokens_neox': 5594, 'n_words': 613, 'path': 'save/Centrality.ipynb', 'repo_name': 'DAIZHENWEI/FastGCN_pytorch', 'size': '13320'}