-
Notifications
You must be signed in to change notification settings - Fork 6
/
create_files.py
111 lines (95 loc) · 5.13 KB
/
create_files.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
from modules.graph import Graph
graph = Graph()
dataset_path = ''
graph.read_from_edgelist(f'{dataset_path}/edges_remove_3x_nodes_degree_1.csv')
# Create node list for link prediction task
# Graph.write_nodelist(graph.get_graph(),
# dataset_path,
# f'{dataset_path}/node_features.csv',
# )
# Create node list for AS_hegemony classification task
# Graph.write_nodelist(graph.get_graph(),
# dataset_path,
# f'{dataset_path}/node_features.csv',
# [
# 'AS_hegemony'
# ])
# Create node list for AS_rank_continent classification task. The labels that contains few records are merged in the same label
# Graph.write_nodelist(graph.get_graph(),
# dataset_path,
# f'{dataset_path}/node_features.csv',
# [
# 'AS_rank_continent_None', 'AS_rank_continent_Africa', 'AS_rank_continent_Asia',
# 'AS_rank_continent_Europe', 'AS_rank_continent_North America', 'AS_rank_continent_Oceania',
# 'AS_rank_continent_South America'
# ],
# True)
# Create node list for link prediction task using the node2vec embeddings
# Graph.write_nodelist(graph.get_graph(),
# dataset_path,
# f'{dataset_path}/node2vec-embeddings16-10-100.txt',
# )
# Create node list for link prediction task using the bgp2vec embeddings
# Graph.write_nodelist_with_subset(graph.get_graph(),
# dataset_path,
# f'{dataset_path}/bgp2vec-embeddings.txt',
# )
# Create node list for AS_hegemony classification task using the node2vec embeddings
# Graph.write_nodelist(graph.get_graph(),
# dataset_path,
# f'{dataset_path}/node_features.csv',
# [
# 'AS_hegemony'
# ],
# False,
# f'{dataset_path}/node2vec-embeddings16-10-100.txt')
# Create node list for AS_rank_continent classification task using the node2vec embeddings. The labels that contains few records are merged in the same label
# Graph.write_nodelist(graph.get_graph(),
# dataset_path,
# f'{dataset_path}/node_features.csv',
# [
# 'AS_rank_continent_None', 'AS_rank_continent_Africa', 'AS_rank_continent_Asia',
# 'AS_rank_continent_Europe', 'AS_rank_continent_North America', 'AS_rank_continent_Oceania',
# 'AS_rank_continent_South America'
# ],
# True,
# f'{dataset_path}/node2vec-embeddings16-10-100.txt')
# Create node list for AS_hegemony classification task using the deepwalk embeddings
# Graph.write_nodelist(graph.get_graph(),
# dataset_path,
# f'{dataset_path}/node_features.csv',
# [
# 'AS_hegemony'
# ],
# False,
# f'{dataset_path}/deepwalk-embeddings16-10-100.txt')
# Create node list for AS_rank_continent classification task using the deepwalk embeddings. The labels that contains few records are merged in the same label
# Graph.write_nodelist(graph.get_graph(),
# dataset_path,
# f'{dataset_path}/node_features.csv',
# [
# 'AS_rank_continent_None', 'AS_rank_continent_Africa', 'AS_rank_continent_Asia',
# 'AS_rank_continent_Europe', 'AS_rank_continent_North America', 'AS_rank_continent_Oceania',
# 'AS_rank_continent_South America'
# ],
# True,
# f'{dataset_path}/deepwalk-embeddings16-10-100.txt')
# Create node list for AS_hegemony classification task using the bgp2vec embeddings
# Graph.write_nodelist_with_subset(graph.get_graph(),
# dataset_path,
# f'{dataset_path}/node_features.csv',
# [
# 'AS_hegemony'
# ],
# f'{dataset_path}/bgp2vec-embeddings.txt')
# Create node list for AS_rank_continent classification task using the bgp2vec embeddings. The labels that contains few records are merged in the same label
# Graph.write_nodelist_with_subset(graph.get_graph(),
# dataset_path,
# f'{dataset_path}/node_features.csv',
# [
# 'AS_rank_continent_None', 'AS_rank_continent_Africa', 'AS_rank_continent_Asia',
# 'AS_rank_continent_Europe', 'AS_rank_continent_North America', 'AS_rank_continent_Oceania',
# 'AS_rank_continent_South America'
# ],
# True,
# f'{dataset_path}/bgp2vec-embeddings.txt')