tick
tick copied to clipboard
Exponential-kernel hawkes process model without given decay?
Hi there,
I am new to tick and point process model. I have been reading and trying the basic Hawkes process model with exponential kernel. It seems that all of them have to be given decay parameter in advance. Do you provide the model that can estimate the decay too(not the non-parametric model)?
Thanks, Shengzhong
Hi Shengzhong,
Having an unknown decay leads to a non-convex loss that is much harder to optimize. As most of the parametric models in tick rely on convex solvers we did not implement it (yet). Hence there is no direct way to estimate the decay.
Though you can try few things:
- Roughly estimate you kernels with HawkesEM to determine an approximate value of the decay and then use it.
- Use sum of exponential kernels and try multiple decays at once.
- Fit the single exponential kernel Hawkes model for several decays and find which decay leads to the best loss (brute force).
Martin
Okay, I see. Thank you very much. Hope you can also add this functionality in future version, that will be really helpful to me!
Shengzhong
Hello,
I have followed the instructions to test various decay
values and compare the resultant scores
. On my 4-D process, using data at the microsecond level (actually sub microsecond - I have many simultaneous timestamps which I needed to de-duplicate) I find score
increases with decay
, without bound. Is there an interpretation for why this happens?
Thank you
Hello,
The score is the log-likelihood that writes as following:
where the intensity writes for a 1D hawkes process with exponential kernel:
Hence, if the decay
, beta, becomes very large, you will have approximatively
while the integral part that is soustracted to the score will not be modified. Hence, after some threshold, increasing beta somehow means that your intensity behaves like a dirac at each event and this can only deteriorate the score.
Keep in mind that the score will promote intensities functions with high values at times when events occur and low at any other time.
Thank you. I am passing a single decay value and it is being set for all dimensions. I know that one pair of intensities are much greater than the other pair. Is there any rule of thumb I can use for setting these manual estimates? Currently, the log likelihood is uniformly increasing over all values of one dimensional decay
A simple way to find the best decay in the original question:
from scipy.optimize import minimize
def find_decay(timestamps, decays_init):
def min_hawkes_sum_exp(decays_init):
return -HawkesSumExpKern(decays_init, solver='bfgs')
.fit(timestamps).score()
return minimize(min_hawkes_sum_exp, decays_init, method='Nelder-Mead',
options={'disp': True})
Then running:
find_decay(data_frame_timestamps, np.array([[guess.]])).x
will give you the answer. You can also plot +HawkesSumExpKern(decays_init, solver='bfgs').fit(timestamps).score() to search for the region where the maximum is