Coder Social home page Coder Social logo

deepcas's Introduction

DeepCas

This repository provides a reference implementation of DeepCas as described in the paper:

DeepCas: an End-to-end Predictor of Information Cascades
Cheng Li, Jiaqi Ma, Xiaoxiao Guo and Qiaozhu Mei
World wide web (WWW), 2017

The DeepCas algorithm learns the representation of cascade graphs in an end-to-end manner for cascade prediction.

Torch implementation

Prerequisites

The following packages are required to install:

luarocks install cephes
luarocks install optim
luarocks install cudnn
luarocks install dp
luarocks install dpnn
luarocks install tds
luarocks install rnn

Basic Usage

Example

To run DeepCas on a test data set, execute the following command:

cd DeepcasTorch
python gen_walks/gen_walks.py --dataset test-net
cd torch
th main/run.lua --dataset test-net

Options

You can check out the other options available to use with DeepCas using:

python gen_walks/gen_walks.py --help
th main/run.lua --help

Input

global_graph.txt lists each node's neighbors in the global network:

node_id \t\t (null|neighbor_id:weight \t neighbor_id:weight...)

"\t" means tab, and "null" is used when a node has no neighbors.

cascade_(train|val|test).txt list cascades, one cascade per line:

cascade_id \t starter_id... \t constant_field \t num_nodes \t source:target:weight... \t label...

"starter_id" are nodes who start the cascade, "num_nodes" counts the number of nodes in the cascade. Since we can predict cascade growth at different timepoints, there could be multiple labels.

Tensorflow Implementation

Prerequisites

Tensorflow 0.12.1

Basic Usage

To run DeepCas tensorflow version on a test data set, execute the following command:

cd DeepCas
python gen_walks/gen_walks.py --dataset test-net
cd tensorflow
python preprocess.py
python run.py

Citing

If you find DeepCas useful for your research, please consider citing the following paper:

@inproceedings{DeepCas-www2017,
author = {Li, Cheng and Ma, Jiaqi and Guo, Xiaoxiao and Mei, Qiaozhu},
 title = {DeepCas: an End-to-end Predictor of Information Cascades},
 booktitle = {Proceedings of the 26th international conference on World wide web},
 year = {2017}
}

Miscellaneous

Please send any questions you might have about the code and/or the algorithm to [email protected].

deepcas's People

Contributors

chengli-um avatar jiaqima avatar

Watchers

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