# DeepCas **Repository Path**: wu58814/DeepCas ## Basic Information - **Project Name**: DeepCas - **Description**: No description available - **Primary Language**: Python - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 1 - **Forks**: 0 - **Created**: 2020-10-29 - **Last Updated**: 2022-06-10 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # DeepCas Adopted to `Python3 `and `tensorflow1`, removed the `lua` files. This repository provides a reference implementation of [*DeepCas* as described in the paper](https://arxiv.org/abs/1611.05373): 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. ## Structure of Data Each dataset in a directory of `data`. Files in data: - cascasdes used in train, validation and test: - `cascade_test.txt` - `cascade_train.txt` - `cascade_val.txt` Format: > graph_id \t [author_id ] \t org_date \t num_nodes \t [source:target:weight ] \t [label ] The `weight` set to 1, `author_id` and `org_date` are not used in algorithm, keep it blank is ok. - all edges in global graph(all cascades in one graph): - `global_graph.txt` Format: > node_id \t\t null|[target_id:freq \t ] The `freq` means the number of times an edge appears in a graph with multiple edges. In `test-net`, many edges are not reflected in the cascade. ## Tensorflow Implementation ### Prerequisites - Tensorflow ~~0.12.1~~ **1.15** - python 3.6.2 - gensim 2.3.0 - netwotrkx 1.11 See `requirements.txt` for more details. Also, vitual environments in `Anaconda` is recommend, see `environment.yml` for more detail. ### Basic Usage To run *DeepCas* tensorflow version on a test data set, execute the following command: ```{r, engine='bash', count_lines} cd DeepCas python gen_walks/gen_walks.py --dataset test-net cd tensorflow python preprocess.py python run.py ``` You can use `python run.py | tee output.txt` for saving the output to file `output.txt` while keeping print to screen(for powershell). ## 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 .