Skip to content

Multivariate history#79

Merged
JoseKling merged 8 commits into
mainfrom
MultivariateHistory
Apr 25, 2026
Merged

Multivariate history#79
JoseKling merged 8 commits into
mainfrom
MultivariateHistory

Conversation

@JoseKling
Copy link
Copy Markdown
Owner

@JoseKling JoseKling commented Mar 27, 2026

Implementation of multivariate processes. Discussion in Issue #73

  • History

Contains an array times with the event times, an array marks with corresponding marks, and another array dims with corresponding dimension

  • UnivariatePointProcess and MultivariatePointProcess

All previous implementations remained unchanged, but now these processes are subtypes of UnivariatePointProcess.
Multivariate processes were implemented separetely as MultivariatePointProcess. This allowed the implementation of IndependentMultivariateProcess and MultivariatePoissonProcess simply using an array of univariate processes.

- Change the models to hold vectors of parameters instead of single
  parameters
- Update methods to return multivariate histories
- Update tests

Steps
- Update general interface for `AbstractPointProcess`
- Update `simulation.jl`
- Update homogeneous Poisson and related methods
- Update inhomogeneous Poisson and related methods
- Update hypothesis tests
    - They work only for univariate processes. Generalization for the
      futrue
- Ignore Hawkes processes, since they will be implemented in another PR
- Takes an array of parameters
- Methods like `ground_intensity` return an array
- Added methods with an argument `d::Int` to get the values from
  specific dimensions
This reverts commit 90f08d6.
Instead of making all processes multivariate, implement tem separately.
- `AbstractMultivariateProcess`
- `IndependenteMultivariateProcess`
- `DependentMultivariateProcess`?
- Other processes, such as `MultivariateHawkesProcess`
Univariate and multivariate processes are different
types.

Implementation for univariate processes remained unchanged.
Copy link
Copy Markdown
Contributor

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

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

Remaining comments which cannot be posted as a review comment to avoid GitHub Rate Limit

JuliaFormatter

[JuliaFormatter] reported by reviewdog 🐶

InhomogeneousPoissonProcess{
PiecewiseConstantIntensity{Float64},Dirac{Nothing}
},


[JuliaFormatter] reported by reviewdog 🐶

InhomogeneousPoissonProcess{
PiecewiseConstantIntensity{Float64},Dirac{Nothing}
},


[JuliaFormatter] reported by reviewdog 🐶

InhomogeneousPoissonProcess{
PiecewiseConstantIntensity{Float64},Dirac{Nothing}
},


[JuliaFormatter] reported by reviewdog 🐶

InhomogeneousPoissonProcess{
PiecewiseConstantIntensity{Float64},Dirac{Nothing}
},


[JuliaFormatter] reported by reviewdog 🐶

InhomogeneousPoissonProcess{
PiecewiseConstantIntensity{Float32},Dirac{Nothing}
},


[JuliaFormatter] reported by reviewdog 🐶

pp_est.intensity_function.coefficients[i] -
intensity_true.coefficients[i],


[JuliaFormatter] reported by reviewdog 🐶

mark_dists = [Normal(), Exponential(1.0), Uniform(0,1)]


[JuliaFormatter] reported by reviewdog 🐶

@test intensity(pp1, 0, 0, h) == [intensity(pp1.processes[d], 0, 0, h) for d in 1:ndims(pp1)]


[JuliaFormatter] reported by reviewdog 🐶

@test log_intensity(pp1, 0, 0, h) [log_intensity(pp1.processes[d], 0, 0, h) for d in 1:ndims(pp1)]


[JuliaFormatter] reported by reviewdog 🐶

pp_est1 = fit(fill(PoissonProcess{Float64, Normal}, 3), h1)
pp_est2 = fit(fill(PoissonProcess{Float64, Normal}, 3), h2)


[JuliaFormatter] reported by reviewdog 🐶


[JuliaFormatter] reported by reviewdog 🐶


[JuliaFormatter] reported by reviewdog 🐶

@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 12, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@JoseKling JoseKling marked this pull request as ready for review April 13, 2026 16:49
@JoseKling JoseKling force-pushed the MultivariateHistory branch 2 times, most recently from 3e2718c to 13531e3 Compare April 25, 2026 10:42
@JoseKling JoseKling force-pushed the MultivariateHistory branch from 13531e3 to 271a4db Compare April 25, 2026 15:08
@JoseKling JoseKling merged commit 524b517 into main Apr 25, 2026
5 of 6 checks passed
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.

1 participant