GithubHelp home page GithubHelp logo

isabella232 / node2vec Goto Github PK

View Code? Open in Web Editor NEW

This project forked from lyft/node2vec

0.0 0.0 0.0 50 KB

Home Page: http://snap.stanford.edu/node2vec/

License: MIT License

Scala 73.13% Python 26.87%

node2vec's Introduction

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 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 <weight_float, optional>

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 ... dimd

where 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 [email protected].

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.

node2vec's People

Contributors

aditya-grover avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.