refactor(pyrox-xtreme): the exponential Hawkes compensator runs on integrix's VolterraOperator

Open
#613 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
52/100
Issue type
Refactor
Clarity
Clearly specified
Activity status
Active
Tech stack
python
Domain
backend, data

Research direction

Read packages/pyrox-xtreme/src/pyrox_xtreme/point_processes/operators/hawkes.py and distributions/hawkes.py, then check whether integrix#138 is available and how VolterraOperator is exposed. Replace the internal recursion with that operator while preserving the public API. Compare likelihoods to 10⁻¹² on existing tests and a long synthetic sequence, check gradients for μ, α and β, and run lint, type checks, and tests.

Written by the indexing model from the issue text.

Description

pkg:xtreme type:feature

Problem / Request

Compute the intensity and compensator of pyrox_xtreme.point_processes.ExponentialHawkes with integrix.operator.VolterraOperator, the causal integral operator with an exponential kernel, instead of a recursion written in pyrox-xtreme.

User Story

As the pyrox-xtreme maintainer, I want the Hawkes compensator to be integrix's causal operator, so one tested scan serves the point processes and any other memory operator in the stack.

Motivation

The Hawkes intensity is a Volterra operator on the counting measure, and its compensator is the same operator integrated once more (design §4.8). integrix gains VolterraOperator in jejjohnson/integrix#138; this issue makes pyrox-xtreme its first consumer.

Proposed API

Public API of ExponentialHawkes unchanged:

# today (pyrox-xtreme), unchanged
ExponentialHawkes(...).log_prob(times, mask)
# proposed (integrix, jejjohnson/integrix#138): λ(t) = μ + 𝒱[dN](t), Λ(t) = μ t + ∫₀ᵗ 𝒱[dN](s) ds
volterra = integrix.operator.VolterraOperator(scale=alpha, decay=beta)

References & Existing Code

  • Design: docs/design/missing_operators.md in jejjohnson/geostack (merged in jejjohnson/geostack#371): §4.8, decision GS-D9, step S9.
  • ExponentialHawkes in packages/pyrox-xtreme/src/pyrox_xtreme/point_processes/operators/hawkes.py and distributions/hawkes.py.

Implementation Steps

  • Replace the internal recursion with VolterraOperator; add integrix as a dependency of pyrox-xtreme if it is not one already.

Definition of Done

  • The Hawkes log-likelihood unchanged to 10⁻¹² on the existing tests and a long synthetic sequence.
  • Gradients with respect to μ, α and β unchanged.
  • Lint, type check and tests green.

Relationships

  • Parent: jejjohnson/geostack#372
  • Blocked by: jejjohnson/integrix#138
Dominant language
Python
Stars
1
Forks
0
Avg merge
8h 28m
Merged PRs (30d)
139

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from jejjohnson/pyrox

All issues in jejjohnson/pyrox

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.