Coder Social home page Coder Social logo

nrp-code's Introduction

Update

An early version of this code has a bug that makes it incorrectly processes undirected graphs. This bug is rectified in the current version.

Layout

  1. data
  2. algos
  3. eval
  4. embds

Input

See an example in data/wiki/

  1. attrs.txt
  2. edgelist.txt
  3. labels.txt
  4. full.mat

Download edgelists & labels from here Download mat files from here

Output

In embds/wiki/

Preprocessing

  1. Split training, testing and negative edge sets for link prediction
$ cd eval/
$ python splitTrainTest.py --action split --data wiki --ratio=0.3
$ python splitTrainTest.py --action select --data wiki --ratio=0.3

Then convert edgelist.train.txt to a train.mat, which contains four variables: 'A', 'P', 'Dout', 'Din' and format '-v7.3'. 'A' is adjacency matrix, 'P' is transition matrix, 'Dout' is out-degree array, 'Din' is in-degree array. 'A' and 'P' are sparse matrices.

  1. Generate node pairs for graph reconstruction
$ cd eval/
$ python gen_nodepairs.py --data wiki --ratio=0.01

Algorithm

See readme.md in algos/nrp/

Evaluation

$ cd eval/
$ python eval_linkpred.py --algo nrp --data wiki --d 128
$ python graphreconstruct_util.py --algo nrp --data wiki --d 128

Citation

@article{yang2020homogeneous,
  title={Homogeneous network embedding for massive graphs via reweighted personalized PageRank},
  author={Yang, Renchi and Shi, Jieming and Xiao, Xiaokui and Yang, Yin and Bhowmick, Sourav S},
  journal={Proceedings of the VLDB Endowment},
  volume={13},
  number={5},
  pages={670--683},
  year={2020},
  publisher={VLDB Endowment}
}

nrp-code's People

Contributors

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