图的netlsd描述符。多层次比较分析图形结构!
NetLSD的Python项目详细描述
netlsd是一个谱图描述族。给定一个图,netlsd计算一个可以用于不同任务的低维向量表示。
快速启动
importnetlsdimportnetworkxasnxg=nx.erdos_renyi_graph(100,0.01)# create a random graph with 100 nodesdescriptor=netlsd.heat(g)# compute the signature
就这样!然后,可以很容易地比较两个图的签名。netlsd本机支持networkx、graph_tool和igraph包。
importnetlsdimportnumpyasnpdistance=netlsd.compare(desc1,desc2)# compare the signatures using l2 distancedistance=np.linalg.norm(desc1-desc2)# equivalent
有关更高级的用法,请查看online documentation。
要求
- 努比
- scipy
安装
- cd netlsd
- pip install-r requirements.txt
- python setup.py安装
或者干脆pip install netlsd
引用
如果您发现netlsd对您的研究有用,请您引用以下论文:
@inproceedings{Tsitsulin:2018:KDD, author={Tsitsulin, Anton and Mottin, Davide and Karras, Panagiotis and Bronstein, Alex and M{\"u}ller, Emmanuel}, title={NetLSD: Hearing the Shape of a Graph}, booktitle = {Proceedings of the 24th ACM SIGKDD International Conference on Knowledge Discovery and Data Mining}, series = {KDD '18}, year = {2018}, }