Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/aditya-grover/node2vec
https://github.com/aditya-grover/node2vec
Last synced: 25 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/aditya-grover/node2vec
- Owner: aditya-grover
- License: mit
- Created: 2016-06-28T02:39:51.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2022-07-21T14:37:25.000Z (over 2 years ago)
- Last Synced: 2024-10-01T21:41:06.046Z (about 1 month ago)
- Language: Scala
- Homepage: http://snap.stanford.edu/node2vec/
- Size: 50.8 KB
- Stars: 2,613
- Watchers: 63
- Forks: 913
- Open Issues: 95
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
- awesome-graph-based-semi-supervised-learning - code
- StarryDivineSky - aditya-grover/node2vec
README
# node2vec
This repository provides a reference implementation of *node2vec* as described in the paper:
> node2vec: Scalable Feature Learning for Networks.
> Aditya Grover and Jure Leskovec.
> Knowledge Discovery and Data Mining, 2016.
>The *node2vec* algorithm learns continuous representations for nodes in any (un)directed, (un)weighted graph. Please check the [project page](https://snap.stanford.edu/node2vec/) for more details.
### Basic Usage
#### Example
To run *node2vec* on Zachary's karate club network, execute the following command from the project home directory:
``python src/main.py --input graph/karate.edgelist --output emb/karate.emd``#### Options
You can check out the other options available to use with *node2vec* using:
``python src/main.py --help``#### Input
The supported input format is an edgelist:node1_id_int node2_id_int
The graph is assumed to be undirected and unweighted by default. These options can be changed by setting the appropriate flags.#### Output
The output file has *n+1* lines for a graph with *n* vertices.
The first line has the following format:num_of_nodes dim_of_representation
The next *n* lines are as follows:
node_id dim1 dim2 ... dimdwhere dim1, ... , dimd is the *d*-dimensional representation learned by *node2vec*.
### Citing
If you find *node2vec* useful for your research, please consider citing the following paper:@inproceedings{node2vec-kdd2016,
author = {Grover, Aditya and Leskovec, Jure},
title = {node2vec: Scalable Feature Learning for Networks},
booktitle = {Proceedings of the 22nd ACM SIGKDD International Conference on Knowledge Discovery and Data Mining},
year = {2016}
}### Miscellaneous
Please send any questions you might have about the code and/or the algorithm to .
*Note:* This is only a reference implementation of the *node2vec* algorithm and could benefit from several performance enhancement schemes, some of which are discussed in the paper.