Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Goodness-of-fit diagnostics for Hawkes EM algorithm #507

Merged
merged 39 commits into from
Mar 5, 2023

Conversation

claudio-tw
Copy link
Contributor

This PR proposes to add new methods to the class HawkesEM, and to expand goodness-of-fit diagnostics for the expectation-maximisation algorithm. The key capability is the computation of compensators of Hawkes processes, defined as time-integrals of the conditional intensity functions. (Notice that "compensator" is also used to refer to a subroutine in the calibration routine, but no confusion should arise).
This PR also introduces google tests for the class HawkesEM.

Copy link
Contributor

@Mbompr Mbompr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice

@claudio-tw
Copy link
Contributor Author

@PhilipDeegan Do you know why the build on Ubuntu is failing?

@PhilipDeegan
Copy link
Member

consider rebasing #510, with that we can see if all the builds fail the same wya

@claudio-tw claudio-tw marked this pull request as ready for review March 3, 2023 13:58
@claudio-tw claudio-tw changed the title Draft: Goodness-of-fit diagnostics for Hawkes EM algorithm Goodness-of-fit diagnostics for Hawkes EM algorithm Mar 3, 2023
ulong uv = u * n_nodes + v;
for (ulong k = 0; k < kernel_size; ++k) {
ulong vk = v * kernel_size + k;
double t = t0 + k * dt + .5 * dt; // kernel_discretization[k] + .5 * dt;
Copy link
Member

@PhilipDeegan PhilipDeegan Mar 4, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

are these helpful in any way?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think so. The evaluation of the Hawkes kernel is very consequential for the EM algorithm. Before these tests were in place, I could not really be sure about the correctness of the evaluation.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sorry I meant the commented out code, not the test

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah, sure, that was meant to link the manual increment to the point in the array. I can take that out.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done here: e43af7e

@PhilipDeegan PhilipDeegan merged commit 04dbb37 into X-DataInitiative:master Mar 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants