# DeepHawkes_py3.6 **Repository Path**: wu58814/DeepHawkes_py3.6 ## Basic Information - **Project Name**: DeepHawkes_py3.6 - **Description**: Amazing DeepHawkes - **Primary Language**: Python - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2021-05-27 - **Last Updated**: 2022-11-09 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # DeepHawkes_py3.6 Rewirte "DeepHawkes" for python 3.6 edition. The dataset is selected partly from CaoQi's. Origin: ---- This repository is an implementation of our proposed DeepHawkes model in the following paper: ```bib Qi Cao, Huawei Shen, Keting Cen, Wentao Ouyang, Xueqi Cheng. 2017. DeepHawkes: Bridging the Gap between Prediction and Understanding of Information Cascades. In Proceedings of CIKM'17, Singapore., November 6-10, 2017, 11 pages. ``` For more details, you can download this paper from ACM DIGITAL LIBRARY. The following url is the corresponding download link: ## DataSet We publish the Sina Weibo Dataset used in our paper,i.e., dataset_weibo.txt. It contains 119,313 messages in June 1, 2016. Each line contains the information of a certain message, the format of which is: ```text \tab\tab\tab\tab : the unique id of each message, ranging from 1 to 119,313. : the unique id of root user. The user id ranges from 1 to 6,738,040. : the publish time of this message, recorded as unix timestamp. : the total number of retweets of this message within 24 hours. : the retweets of this message, each retweet is split by " ". Within each retweet, it records the entile path for this retweet, the format of which is //......:. ``` This dataset is limited to only use in research. And when you use this dataset, please cite our paper as listed above. Downlowd link: password: ijp6 ## Steps to run DeepHawkes 1. Installation requirements in `environment.yml`. ```shell conda env create -f environment.yml conda activate tf1.6 ``` 2. Set the parameters of dataset and observation in `deep_learning/config.py` and `gen_sequence/config.py` quickly. ```shell python init_config.py --observation 1.0 --dataset twitter ``` 3. split the data to train set, validation set and test set. ```shell cd gen_sequence python gen_shortestpath.py #you can configure parameters and filepath in the file of "config.py" ``` 4. trainsform the datasets to the format of ".pkl" ```shell cd deep_learning python preprocess.py #you can configure parameters and filepath in the file of "config.py" ``` 5. train DeepHawkes ```shell cd deep_learning python run_sparse.py learning_rate learning_rate_for_embeddings l2 dropout #exsamples python -u run_sparse.py 0.005 0.0005 0.05 0.8 > output.log$(date "+%Y-%m-%d %H:%M:%S") ```