The current implementations only account for mark distributions that are independent from the event times. This is mainly focused on using Distributions.jl as mark distributions.
There are some obvious limitations to that and it is also a bit cumbersome at times. Some issues:
- It is not straightforward to use a
PoissonProcess with a mark distribution that depends on time or the history
- Using the
Dirac(nothing) for unmarked processes is annoying and not intuitive. It has no logdensityof method, which breaks some methods.
- Parametrizing processes on the distribution
D doesn't really do anything right now
I would propose we add a AbstractMarkDistribution that can be easily extended and implements the necessary interface independently of the process. We could have things like
# To keep the current implementation with distributions from `Distributions.jl`
struct FixedDistribution{D<:Distribution} <: AbstractMarkDistribution
mark_dist::D
end
mark_distribution(m::FixedDistribution, t , h) = m.mark_dist()
# Easily extend to other cases
struct NonStationaryNormalDistribution{R<:Real} <: AbstractMarkDistribution
a::R
b::R
end
mark_distribution(m::NonStationaryNormalDistribution, t , h) = Normal( a * t + b)
# Fix `Dirac(nothing)` density issue and makes it a lot more intuitive
struct NoMarks <: AbstractMarkDistribution end
mark_distribution(m::NoMarks, t , h) = Dirac(nothing)
StatsAPI.densityof(m::NoMarks, nothing) = 1.0
would require a bit more thought on the interface, but should not differ much from what we already have.
The current implementations only account for mark distributions that are independent from the event times. This is mainly focused on using
Distributions.jlas mark distributions.There are some obvious limitations to that and it is also a bit cumbersome at times. Some issues:
PoissonProcesswith a mark distribution that depends on time or the historyDirac(nothing)for unmarked processes is annoying and not intuitive. It has nologdensityofmethod, which breaks some methods.Ddoesn't really do anything right nowI would propose we add a
AbstractMarkDistributionthat can be easily extended and implements the necessary interface independently of the process. We could have things likewould require a bit more thought on the interface, but should not differ much from what we already have.