Code Monkey home page Code Monkey logo

deepwalk's Introduction

deepwalk

weighted deepwalk implementation in c++.

Build

make

Usage

  1. python scripts/validate_graph.py graph_file
  2. ./walk graph_file max_vertex_idx start_index(0/1) num_iter num_step output_file [idx_list_file]
    graph_file: something.edge or something.adj or something.edge.directed. Only left -> right is an edge in edge.directed file.
    max_vertex_idx: max graph node index.
    start_index: graph node start index, 0 or 1.
    num_iter: iteration number of all nodes.
    num_step: max step number of each walk.
    output_file: output walks file.
    idx_list_file: graph node name and idx list, name\tindex\n.

example

python scripts/validate_graph.py data/sample.edgelist.weight.txt
you will get output: (valid) start index: 0, max vertex idx: 6300, total 6301 vertex.
./walk data/sample.edgelist.weight.txt 6300 0 25 40 random_walks.txt

Requirements

C++11
OpenMP

deepwalk's People

Contributors

dongguosheng avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

deepwalk's Issues

Random number generator for float values less than 1

Hi,

Considering the case wherein the edge weights are floating point numbers between 0 and 1, the lower bound for generating random number (specified on L194) need to be set to 0 in order to contain the distribution upto the net cumulative sum.
Also, if I'm not wrong, even if the edge weights are not scaled between 0 and 1, the lower bound of 0 would still work. Can the range be modified in order to accommodate all the possible cases by updating the lower bound?

Walks for Directed Graph

Hi Dong Guosheng,
Great work, works good for weighted undirected graph. Was wondering to experiment it on directed graph. Is there any specific configuration to use it for weighted directed graph.

Some issues with dense graph

Hi,
It works well, but for few dense graph I get following error while loading edgelist:
walk: deepwalk.h:103: bool deepwalk::Graph::LoadEdgeList(const char*, int) [with T = unsigned int]: Assertion `id_right < data.size()' failed.

Working example for graph with real number weights

Hi,
How can I use it for graph with real number weights?
I get the segmentation fault when I run it on one of my graph in edgelist format.
Could you please provide a working example of it.

Thanks,
Asif

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.