TiDeH: Time-Dependent Hawkes model for predicting future retweet activity

This page was created by Ryota Kobayashi in collaboration with Renaud Lambiotte published in ICWSM 2016.

Here is the link for Chinese version.

Model Equations

1. The probability for getting a retweet in a short time interval \( [t, t+ \Delta t ] \)

\( \rm{Prob}(\rm{Getting\ a\ retweet\ in}\ [t, t+ \Delta t ])= \lambda(t) \Delta t \)

where, \( \lambda(t) \) is the retweet rate.

2. The retweet rate \( \lambda(t) \) is given as following:

\( \lambda(t)= p(t) \sum_{i: t_i < t} d_i \phi(t-t_i) \),

where, \( p(t)= p_0 C(t) e^{-(t-t_0)/\tau_m } \) is the time-dependent infectious rate, \( C(t)= 1- r_0 \sin\left( \frac{2\pi}{T} (t- t_p) \right) \) is the circadian function, \( d_i \) is the number of followers of the i-th retweeted person, and \( \phi(t) \) is the memory function.


A Sample C code for forecasting retweet activity

1. Download and unzip a zip file.

2. Parameter Estimation:
    Type "make est "
    Type "./est_TDH test_RT.txt par.txt 0.0833 T "
where T is the obervation time (hour). \( s_0= 0.0833 \) is a parameter of the memory function \( \phi(t) \).

3. Forecasting retweet activity:
    Type "make pred "
    Type "./pred_TDH test_RT.txt par.txt pred.txt T 0.0833 w "
where w is the bin width for the forecast (hour).


Kobayashi R, and Lambiotte R.
TiDeH: Time-Dependent Hawkes Process for Predicting Retweet Dynamics.
ICWSM 2016

If you have any questions, or have suggestions for improving the programs, please contact  Ryota Kobayashi.