# graphwave **Repository Path**: jjjxk/graphwave ## Basic Information - **Project Name**: graphwave - **Description**: No description available - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2020-04-23 - **Last Updated**: 2024-12-03 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # GraphWave ## Spectral Wavelets for learning structural signatures in complex networks This folder contains the code for GraphWave, an algorithm for computing structural signatures for nodes in a network using heat spectral wavelets. This code folder is organized as follows: + __shapes/__: contains the functions for generating (more or less) regular graphs and shapes + __performance_evaluation/__: functions computing different metrics for assessing the quality of the embeddings generated by GraphWave + __test\_perturbation\_synthetic/__: set of ipython notebooks for running the synthetic experiments described in the paper. + __utils/__: set of helper functions + files: + __characteristic\_functions.py__: functions for computing the characteristic functions. + __graphwave.py__: wrapper function for computing the embeddings.     ### Prerequisites GraphWave was written for __Python 2.7__ and requires the installation of the following Python libraries: + __networkx__: allows easy manipulation and plotting of graph objects (more information in the [Networkx website](https://networkx.github.io)). + __pyemd__: module for computing Earth Mover distances (for trying out other distances between diffusion distributions. More information in the [pyemd website](https://github.com/wmayner/pyemd)) Also, need standard packages: __scipy, sklearn, seaborn__ for analyzing and plotting results. Note: heat diffusion scaling wavelets can also be computed with the Graph Signal Processing toolbox __pygsp__ (accessible through the [EPFL website](https://pygsp.readthedocs.io/en/stable/) ), which, beyond structural similarities, has plenty of extremely useful features for handling signals on graphs.     ## Running Graphwave A full example on how to use GraphWave is provided in the ''Using GraphWave.ipynb" of this directory. In a nutshell: + input: nx (or pygsp) Graph structure + compute the heat wavelets + embed the distributions in Euclidean space using the characteristic function + output: signatures, which can be used in one's favorite Machine Learning framework. For a given graph __G__ (of type pygsp or nx),GraphWave structural signatures can be simply computing by calling: ``` >from graphwave import graphwave >chi,heat_print, taus=graphwave_alg(G, 'automatic', verbose=False) ``` ## Authors * Anonymous at this time ## Acknowledgements We would like to thank the authors of [struc2vec](https://arxiv.org/abs/1704.03165) for the [open access of the implementation of their method](https://github.com/leoribeiro/struc2vec), as well as [Lab41](http://lab41.github.io/blog/2014/12/18/rolx-discovering-individuals-roles-in-a-social-network/) for its open-access implementation of [RolX](https://dl.acm.org/citation.cfm?id=2339723). ## License This project is licensed under the MIT License - see the [LICENSE.md](LICENSE.md) file for details ======= # graphwave >>>>>>> 5d0c25e5cc6baee37b445b1c0d232dc0d7e43e52