X-DataInitiative / tick

Module for statistical learning, with a particular emphasis on time-dependent modelling
https://x-datainitiative.github.io/tick/
BSD 3-Clause "New" or "Revised" License
480 stars 105 forks source link

Implementation Details for Co-occurring Events in ModelHawkesSumExpKernLeastSq #478

Closed yifeim closed 2 years ago

yifeim commented 2 years ago

Hi,

I have a question about the implementation details for co-occurring events. Co-occurring events are quite common in practice, e.g., due to rounding of timestamps. I searched around the documentation and saw ModelHawkesSumExpKernLeastSq to be the adopted learner for Hawkes models. The documentation says t_k^j<t when constructing the intensity kernels, which seems to be a natural extension of TPP in time-rounded environments. I wonder if this is actually implemented in the codes - which requires double pointers to increment time in mini-jumps, or only done for the natural order of events, presumably leaking information about same-time events. In any case, this would be good to discuss in the documentation.

Thanks.

yifeim commented 2 years ago

Maybe is it supported here?

https://github.com/X-DataInitiative/tick/blob/master/lib/cpp/hawkes/model/model_hawkes_expkern_leastsq_single.cpp#L186

Bacry commented 2 years ago

Hello,

I co-occurring events are present in your data because of rounding of timestamps, it means that they are artefact. So I would not try to model them as being co-occuring.

My advice would be to add some small noise to the timestamps so that there are no co-occuring events any more

Emmanuel

On 9 Aug 2021, at 8:02, yifeim wrote:

Hi,

I have a question about the implementation details for co-occurring events. Co-occurring events are quite common in practice, e.g., due to rounding of timestamps. I searched around the documentation and saw ModelHawkesSumExpKernLeastSq to be the adopted learner for Hawkes models. The documentation says t_k^j<t when constructing the intensity kernels, which seems to be a natural extension of TPP in time-rounded environments. I wonder if this is actually implemented in the codes - which requires double pointers to increment time in mini-jumps, or only done for the natural order of events, presumably leaking information about same-time events. In any case, this would be good to discuss in the documentation.

Thanks.

-- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/X-DataInitiative/tick/issues/478