Skip to main content

Representational learning on graphs

Project description

Build Status Documentation Status

jwalk performs random walks on a graph and learns representations for nodes using Word2Vec. It also has options to train existing models online and specify weights.

Install

pip install -U jwalk

Build

make build

Usage

jwalk -i tests/data/karate.edgelist -o karate.emb --delimiter=' '

To see the full list of options:

jwalk --help

Prompt parameters:
  debug:            drop a debugger if an exception is raised
  delimiter:        delimiter for input file
  embedding-size:   dimension of word2vec embedding (default=200)
  has-header:       boolean if csv has header row
  help (-h):        argparse help
  input (-i):       file input (edge list or scipy adjacency CSR matrix)
  log-level (-l)    logging level (default=INFO)
  model (-m):       use a pre-existing model
  num-walks (-n):   number of of random walks per graph (default=1)
  output (-o):      file output
  stats:            boolean to calculate walk statistics [requires pandas]
  undirected:       make graph undirected
  walk-length:      length of random walks (default=10)
  window-size:      word2vec window size (default=5)
  workers:          number of workers (default=multiprocessing.cpu_count)

Test

Running unit tests:

make test

Running linter:

make lint

Running tox:

make test-all

License

Apache License 2.0

References

  • [paper]: arXiv:1403.6652 [cs.SI] “DeepWalk: Online Learning of Social Representations”

  • [paper]: arXiv:1607.00653 [cs.SI] “node2vec: Scalable Feature Learning for Networks”

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

jwalk-0.5.0.tar.gz (349.4 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page