Add flight data

This commit is contained in:
Weichen Shen 2019-02-14 21:22:18 +08:00
parent 4b06fe76da
commit a804ec8343
7 changed files with 22411 additions and 7 deletions

View File

@ -3,12 +3,14 @@
# Method
| Model | Paper | Note |
| :------: | :------------------------------------------------------------------------------------------------------------------------- | :----------------------------------------------------------------------------------------- |
| DeepWalk | [KDD 2014][DeepWalk: Online Learning of Social Representations](http://www.perozzi.net/publications/14_kdd_deepwalk.pdf) | [【Graph Embedding】DeepWalk算法原理实现和应用](https://zhuanlan.zhihu.com/p/56380812) |
| LINE | [WWW 2015][LINE: Large-scale Information Network Embedding](https://arxiv.org/pdf/1503.03578.pdf) | [【Graph Embedding】LINE算法原理实现和应用](https://zhuanlan.zhihu.com/p/56478167) |
| Node2Vec | [KDD 2016][node2vec: Scalable Feature Learning for Networks](https://www.kdd.org/kdd2016/papers/files/rfp0218-groverA.pdf) | [【Graph Embedding】Node2Vec算法原理实现和应用](https://zhuanlan.zhihu.com/p/56542707) |
| SDNE | [KDD 2016][Structural Deep Network Embedding](https://www.kdd.org/kdd2016/papers/files/rfp0191-wangAemb.pdf) | [【Graph Embedding】SDNE算法原理实现和应用](https://zhuanlan.zhihu.com/p/56637181) |
| Model | Paper | Note |
| :-------: | :------------------------------------------------------------------------------------------------------------------------- | :------------------------------------------------------------------------------------------ |
| DeepWalk | [KDD 2014][DeepWalk: Online Learning of Social Representations](http://www.perozzi.net/publications/14_kdd_deepwalk.pdf) | [【Graph Embedding】DeepWalk算法原理实现和应用](https://zhuanlan.zhihu.com/p/56380812) |
| LINE | [WWW 2015][LINE: Large-scale Information Network Embedding](https://arxiv.org/pdf/1503.03578.pdf) | [【Graph Embedding】LINE算法原理实现和应用](https://zhuanlan.zhihu.com/p/56478167) |
| Node2Vec | [KDD 2016][node2vec: Scalable Feature Learning for Networks](https://www.kdd.org/kdd2016/papers/files/rfp0218-groverA.pdf) | [【Graph Embedding】Node2Vec算法原理实现和应用](https://zhuanlan.zhihu.com/p/56542707) |
| SDNE | [KDD 2016][Structural Deep Network Embedding](https://www.kdd.org/kdd2016/papers/files/rfp0191-wangAemb.pdf) | [【Graph Embedding】SDNE算法原理实现和应用](https://zhuanlan.zhihu.com/p/56637181) |
| Struc2Vec | [KDD 2017][struc2vec: Learning Node Representations from Structural Identity](https://arxiv.org/pdf/1704.03165.pdf) | [【Graph Embedding】Struc2Vec算法原理实现和应用](https://zhuanlan.zhihu.com/p/56733145) |
# How to run examples
1. clone the repo and make sure you have installed `tensorflow` or `tensorflow-gpu` on your local machine.
@ -62,4 +64,15 @@ G = nx.read_edgelist('../data/wiki/Wiki_edgelist.txt',create_using=nx.DiGraph(),
model = SDNE(G,hidden_size=[256,128]) #init model
model.train(batch_size=3000,epochs=40,verbose=2)# train model
embeddings = model.get_embeddings()# get embedding vectors
```
```
## Struc2Vec
```python
G = nx.read_edgelist('../data/flight/brazil-airports.edgelist',create_using=nx.DiGraph(),nodetype=None,data=[('weight',int)])#read graph
model = SDNE(G,hidden_size=[256,128]) #init model
model.train(batch_size=3000,epochs=40,verbose=2)# train model
embeddings = model.get_embeddings()# get embedding vectors
```

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,132 @@
node label
0 0
1 0
2 0
3 0
4 0
5 0
6 0
7 0
8 1
9 0
10 0
11 3
12 3
13 2
14 3
15 0
16 3
17 3
18 1
19 1
20 3
21 0
22 1
23 1
24 0
25 0
26 1
27 0
28 0
29 1
30 0
31 0
32 2
33 1
34 3
35 3
36 0
37 2
38 1
39 1
40 1
41 0
42 1
43 2
44 3
45 1
46 2
47 2
48 1
49 1
50 0
51 0
52 1
53 0
54 1
55 2
56 2
57 2
58 0
59 2
60 1
61 0
62 2
63 1
64 0
65 1
66 0
67 3
68 3
69 0
70 1
71 0
72 3
73 3
74 0
75 1
76 2
77 0
78 2
79 0
80 1
81 2
82 1
83 2
84 1
85 2
86 2
87 1
88 3
89 2
90 2
91 2
92 2
93 1
94 1
95 3
96 1
97 1
98 1
99 2
100 2
101 2
102 2
103 2
104 3
105 3
106 2
107 3
108 3
109 3
110 3
111 3
112 3
113 2
114 3
115 3
116 3
117 3
118 3
119 2
120 3
121 3
122 3
123 2
124 3
125 2
126 3
127 1
128 3
129 3
130 2

View File

@ -0,0 +1,400 @@
node label
0 1
1 1
2 2
3 1
4 0
5 0
6 0
7 0
8 0
9 0
10 0
11 0
12 0
13 1
14 0
15 0
16 0
17 1
18 0
19 0
20 0
21 0
22 0
23 0
24 1
25 1
26 0
27 0
28 3
29 0
30 1
31 0
32 1
33 0
34 0
35 0
36 0
37 0
38 0
39 0
40 0
41 0
42 3
43 0
44 0
45 0
46 1
47 0
48 3
49 1
50 0
51 0
52 1
53 0
54 0
55 0
56 0
57 0
58 0
59 1
60 0
61 0
62 0
63 0
64 0
65 0
66 0
67 0
68 1
69 1
70 0
71 0
72 0
73 0
74 0
75 0
76 1
77 0
78 0
79 0
80 0
81 2
82 0
83 0
84 1
85 2
86 0
87 0
88 0
89 0
90 0
91 1
92 1
93 0
94 0
95 1
96 0
97 0
98 1
99 0
100 0
101 0
102 1
103 0
104 0
105 0
106 0
107 2
108 3
109 3
110 1
111 2
112 3
113 2
114 1
115 3
116 2
117 1
118 1
119 0
120 1
121 1
122 2
123 3
124 3
125 1
126 3
127 3
128 3
129 1
130 1
131 1
132 1
133 1
134 1
135 2
136 1
137 2
138 1
139 0
140 1
141 0
142 0
143 0
144 2
145 3
146 0
147 1
148 2
149 2
150 3
151 1
152 2
153 1
154 1
155 0
156 3
157 3
158 1
159 1
160 2
161 2
162 1
163 0
164 3
165 1
166 1
167 0
168 1
169 1
170 0
171 0
172 0
173 1
174 1
175 0
176 2
177 1
178 0
179 1
180 3
181 2
182 1
183 0
184 1
185 1
186 2
187 1
188 2
189 2
190 2
191 1
192 2
193 2
194 1
195 1
196 3
197 2
198 2
199 2
200 2
201 2
202 1
203 2
204 2
205 3
206 3
207 2
208 1
209 3
210 3
211 3
212 3
213 2
214 1
215 1
216 2
217 2
218 2
219 3
220 3
221 0
222 3
223 2
224 2
225 3
226 3
227 3
228 1
229 2
230 2
231 1
232 3
233 2
234 3
235 3
236 3
237 1
238 3
239 2
240 0
241 1
242 1
243 1
244 0
245 2
246 1
247 2
248 1
249 1
250 3
251 2
252 1
253 3
254 2
255 3
256 3
257 2
258 3
259 3
260 2
261 3
262 3
263 3
264 2
265 2
266 2
267 2
268 3
269 3
270 3
271 2
272 1
273 2
274 3
275 2
276 3
277 2
278 1
279 3
280 1
281 2
282 2
283 3
284 2
285 1
286 3
287 3
288 3
289 3
290 1
291 1
292 0
293 3
294 2
295 2
296 3
297 2
298 3
299 1
300 3
301 3
302 2
303 2
304 3
305 2
306 3
307 2
308 1
309 2
310 1
311 3
312 2
313 2
314 1
315 3
316 3
317 3
318 1
319 3
320 2
321 3
322 3
323 3
324 3
325 2
326 2
327 2
328 3
329 3
330 3
331 2
332 3
333 2
334 2
335 3
336 3
337 3
338 3
339 3
340 3
341 3
342 3
343 2
344 2
345 2
346 2
347 2
348 3
349 1
350 2
351 2
352 3
353 2
354 0
355 1
356 2
357 3
358 3
359 3
360 1
361 1
362 2
363 1
364 2
365 1
366 1
367 3
368 2
369 3
370 2
371 2
372 3
373 2
374 1
375 1
376 1
377 2
378 1
379 2
380 2
381 3
382 3
383 3
384 3
385 3
386 3
387 3
388 3
389 2
390 1
391 2
392 2
393 3
394 1
395 1
396 3
397 2
398 2

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff