Giter VIP home page Giter VIP logo

nodeingraph's Introduction

NodeInGraph

We first generate node embedding as LINE [1] with the open source code: https://github.com/tangjianpku/LINE

Then we calculate the similarity based on node embedding of the head and tail node as the prediction score. (as shown in model_predict.py)

Instruction to produce the outputs:

1. generate the input file of LINE

source_id1 dest_id1 weight1

source_id2 dest_id2 weight2

source_id3 dest_id3 weight3

...

Note that, the weight is the occurrence frequency of the source node and the destination node.

2. generate LINE embedding

Clone the open source code of LINE from https://github.com/tangjianpku/LINE.

And run LINE embedding generation process in shell:

./line -train train_file -output embedding_file -size 128 -order 1 -negative 5 -samples 100 -rho 0.025 -threads 10

3. prediction the result

Run code in model_predict.py to calculate the dot similarity of two target nodes.

4. reference

[1] LINE: Large-scale Information Network Embedding.

nodeingraph's People

Contributors

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