这些是 AlphaCore KDD 论文的补充文件。
在打包之前,获取文件算法/alphaCore.R
g <- erdos.renyi.game(200, 2/200, directed = T)
E(g)$weight <- 1:ecount(g)
V(g)$name <- paste("v", 1:vcount(g), sep="")
> alphaCore(g)
node alpha batch
1: v1 0.3281309 19
2: v2 0.3281309 30
3: v3 0.3724843 34
4: v4 0.3281309 23
5: v5 0.3281309 19
---
196: v196 0.3281309 28
197: v197 0.0000000 1
198: v198 0.3724843 34
199: v199 0.3281309 23
200: v200 0.3281309 23
> alphaCore(g, featureComputeFun = customNodeFeatures(c("indegree", "triangles")))
node alpha batch
1: v1 0.3060040 14
2: v2 0.0000000 6
3: v3 0.0000000 5
4: v4 0.0000000 5
5: v5 0.0000000 6
---
196: v196 0.6381691 19
197: v197 0.0000000 5
198: v198 0.0000000 5
199: v199 0.6381691 19
200: v200 0.0000000 8
> import networkx as nx
> G = nx.erdos_renyi_graph(n=200, seed=1, p=2/200, directed=True)
> for idx, (u,v,w) in enumerate(G.edges(data=True)):
w['value'] = idx
> alphaCore(G)
nodeID alpha batchID
0 18 0.0 0
1 75 0.0 0
2 78 0.0 0
3 25 0.3 5
4 91 0.3 5
... ... ... ...
195 8 0.7 27
196 131 0.7 27
197 185 0.7 27
198 192 0.7 27
199 158 0.7 28
为了运行,您首先需要下载三个数据集:
这些文件托管在:https://zenodo.org/record/4898412 将transfers.db存储在data/tokens/transfers.db中 匹配的exchangeLabels.csv文件应放置在data/tokens/exchangeLabels.csv
reddit 交叉链接是 http://snap.stanford.edu/conflict/conflict_data.zip 的一部分 在 zip 文件中,可以在 /prediction/detailed_data/ 中找到它们 将文件放在位置 data/reddit/post_crosslinks_info.tsv
从 http://opsahl.co.uk/tnet/datasets/openflights.txt 获取此文件并将其存储在 data/flights/openflights.txt 中。
从主目录打开文件valuation.R。
这是运行评估的主文件。输入您的 CPU 核心数以及提取的数据库文件的路径。
要运行整个评估,最好在带有 Rscript 的服务器上进行,因为某些算法(即依赖于所有对最短路径计算的某些中心性)以及我们自己的加权 k 核实现具有非常长的运行时间。完整执行需要 1-3 天,具体取决于硬件。
然而,具有指数衰减步长的 AlphaCore 速度相当快,尽管它只是一个 R 实现。
请使用以下 BibTeX 条目:
@inproceedings{10.1145/3447548.3467322,
author = {Victor, Friedhelm and Akcora, Cuneyt G. and Gel, Yulia R. and Kantarcioglu, Murat},
title = {Alphacore: Data Depth Based Core Decomposition},
year = {2021},
isbn = {9781450383325},
publisher = {Association for Computing Machinery},
address = {New York, NY, USA},
url = {https://doi.org/10.1145/3447548.3467322},
doi = {10.1145/3447548.3467322},
booktitle = {Proceedings of the 27th ACM SIGKDD Conference on Knowledge Discovery & Data Mining},
pages = {1625–1633},
numpages = {9},
keywords = {core decomposition, networks, data depth},
location = {Virtual Event, Singapore},
series = {KDD '21}
}