Package: nxt-gem
nxt_gem: Graph Embedding MethodsThis package is an updated version of the GEM package ofpalash1992.
Key differences are:smaller codebaseunittests (more to come)updated to current tensorflow and networkx versionGEM: Graph Embedding MethodsMany physical systems in the world involve interactions between different entities and can be represented as graphs. Understanding the structure and analyzing properties of graphs are hence paramount to developing insights into the physical systems. Graph embedding, which aims to represent a graph in a low dimensional vector space, takes a step in this direction. The embeddings can be used for various tasks on graphs such as visualization, clustering, classification and prediction.GEMis a Python package which offers a general framework for graph embedding methods. It implements many state-of-the-art embedding techniques includingLocally Linear Embedding,Laplacian Eigenmaps,Graph Factorization,Higher-Order Proximity preserved Embedding (HOPE),Structural Deep Network Embedding (SDNE)andnode2vec. It is formatted such that new methods can be easily added for comparison. Furthermore, the framework implements several functions to evaluate the quality of obtained embedding including graph reconstruction, link prediction, visualization and node classification. It supports many edge reconstruction metrics including cosine similarity, euclidean distance and decoder based. For node classification, it defaults to one-vs-rest logistic regression classifier and supports other classifiers. For faster execution, C++ backend is integrated using Boost for supported methods. A paper showcasing the results usingGEMon various real world datasets can be accessed throughGraph Embedding Techniques, Applications, and Performance: A Survey. The library is also published asGEM: A Python package for graph embedding methods.Please referhttps://palash1992.github.io/GEM/to access the readme as a webpage.Update: Note that this is a library for static graph embedding methods. For evolving graph embedding methods, please referDynamicGEM. We also recently released Youtube dynamic graph data set which can be found atYoutubeGraph-Dyn.The module was developed and is maintained by Palash Goyal.Implemented MethodsGEM implements the following graph embedding techniques:Laplacian EigenmapsLocally Linear EmbeddingGraph FactorizationHigher-Order Proximity preserved Embedding (HOPE)Structural Deep Network Embedding (SDNE)node2vecA survey of these methods can be found inGraph Embedding Techniques, Applications, and Performance: A Survey.Graph FormatWe store all graphs using theDiGraphasdirected weighted graphin python package networkx. The weight of an edge is stored as attribute "weight". We save each edge in undirected graph as two directed edges.The graphs are saved usingnx.write_gpicklein the networkx format and can be loaded by usingnx.read_gpickle.Repository Structuregem/embedding: existing approaches for graph embedding, where each method is a separate filegem/evaluation: evaluation tasks for graph embedding, including graph reconstruction, link prediction, node classification and visualizationgem/utils: utility functions for graph manipulation, evaluation and etc.gem/data: input test graph (currently hasZachary's Karate graph)gem/c_src: source files for methods implemented in C++gem/c_ext: Python interface for source files in c_src usingBoost.PythonDependenciesnxt_gem is tested to work on Python 3.9The required dependencies are: Numpy >= 1.12.0, SciPy >= 0.19.0, Networkx >= 2.4, Scikit-learn >= 0.18.1.To run SDNE, GEM requires Theano >= 0.9.0 and tensorflow.In case of Python 3, make sure it was compiled with./configure --enable-shared, and that you have/usr/local/bin/pythonin yourLD_LIBRARY_PATH.InstallThe package uses setuptools, which is a common way of installing python modules. To install in your home directory, use:pythonsetup.pyinstall--userTo install for all users on Unix/Linux:sudopythonsetup.pyinstallOr installing via pipwith git:pipinstallgit+https://github.com/jernsting/nxt_gem.gitUsageSee examples.Cite@article{goyal2017graph,
    title = "Graph embedding techniques, applications, and performance: A survey",
    journal = "Knowledge-Based Systems",
    year = "2018",
    issn = "0950-7051",
    doi = "https://doi.org/10.1016/j.knosys.2018.03.022",
    url = "http://www.sciencedirect.com/science/article/pii/S0950705118301540",
    author = "Palash Goyal and Emilio Ferrara",
    keywords = "Graph embedding techniques, Graph embedding applications, Python graph embedding methods GEM library"
}
@article{goyal3gem,
  title={GEM: A Python package for graph embedding methods},
  author={Goyal, Palash and Ferrara, Emilio},
  journal={Journal of Open Source Software},
  volume={3},
  number={29},
  pages={876}
}