Skip to content

time_change should integrate cumulative inter-arrival segments #82

Closed

Description

@rsenne

time_change(h, pp::InhomogeneousPoissonProcess) currently computes the compensator at each event time and at tmax via independent quadrature calls. Independent calls have independent ulp-level rounding errors, so the transformed times can come out of order or slightly past new_tmax. Switching to a cumulative integration over inter-arrival segments removes both failure modes by construction with no change in cost.

Activity

  1. self-assigned this
    on May 10, 2026
  2. added a commit that references this issue on May 17, 2026
    7dcc7f9
  3. JoseKling commented on May 19, 2026

    @JoseKling
    Owner

    It occurred to me that this should actually be standard implementation for AbstractUnivariateProcess, using the integrated_ground_intensity method, instead of integrated_intensity.
    This should be the correct implementation for any process, only to be replaced if there is some benefit. We could even leave the DomainError message, although replaced by something more generic, like
    """
    time_change: integrated intensity over [$(edges[i_neg]), $(edges[i_neg + 1])] is negative. This could mean:

    1. Intensity function is negative.
    2. Incorrect implementation of integrated_ground_intensity.
    3. Floating-point jitter from adaptive quadrature on an interval where the true integral is near zero.
      """
  4. rsenne commented on May 19, 2026

    @rsenne
    CollaboratorAuthor

    So basically make this implementation the fallback i.e., if there is no analytical we can always just use quadrature? That sounds good to me! Want to open an issue with the proposal?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions