API reference

PointProcessesModule
PointProcesses

A package for temporal point process modeling, simulation and inference.

source

Histories

PointProcesses.HistoryType
History{M,T<:Real}

Linear event histories with marks of type M and temporal locations of type T.

Fields

  • times::Vector{T}: sorted vector of event times
  • marks::Vector{M}: associated vector of event marks
  • tmin::T: start time
  • tmax::T: end time
source

Analysis

PointProcesses.has_eventsFunction
has_events(h)

Check the presence of events in h.

source
has_events(h, tmin, tmax)

Check the presence of events in h during the interval [tmin, tmax).

source

Modification

Base.push!Function
push!(h, t, m)

Add event (t, m) at the end of history h.

source

Point processes

PointProcesses.BoundedPointProcessType
BoundedPointProcess{M,P,T} <: AbstractPointProcess{M}

Temporal point process P with pre-defined start and end times.

Implements some fallbacks for the AbstractPointProcess interface which accept fewer arguments.

Fields

  • pp::P: underlying point process
  • tmin::T: start time
  • tmax::T: end time
source

Intensity

PointProcesses.intensityFunction
intensity(pp, m, t, h)

Compute the conditional intensity for a temporal point process pp applied to history h and event (t, m).

The conditional intensity function λ(t,m|h) quantifies the instantaneous risk of an event with mark m occurring at time t after history h.

source
PointProcesses.ground_intensityFunction
ground_intensity(pp, h, t)

Compute the ground intensity for a temporal point process pp applied to history h at time t.

The ground intensity quantifies the instantaneous risk of an event with any mark occurring at time t after history h:

λg(t|h) = Σₘ λ(t,m|h)
source
PointProcesses.log_intensityFunction
log_intensity(pp, m, t, h)

Compute the logarithm of the conditional intensity for a temporal point process pp applied to history h and event (t, m).

source

Marks

PointProcesses.mark_distributionFunction
mark_distribution(pp, t, h)

Compute the distribution of marks for a temporal point process pp knowing that an event takes place at time t after history h.

source

Simulation

Base.randFunction
rand([rng,] pp, tmin, tmax)

Alias for simulate_ogata.

source
rand([rng,], bpp::BoundedPointProcess)

Simulate a point process on a predefined time interval.

source

Inference

DensityInterface.logdensityofFunction
logdensityof(pp, h)

Compute the log probability density function for a temporal point process pp applied to history h:

ℓ(h) = Σₖ log λ(tₖ|hₖ) - Λ(h)

The default method uses a loop over events combined with integrated_ground_intensity, but it should be reimplemented for specific processes if faster computation is possible.

source

Learning

PointProcesses.integrated_ground_intensityFunction
integrated_ground_intensity(pp, h, a, b)

Compute the integrated ground intensity (or compensator) Λ(t|h) for a temporal point process pp applied to history h on interval [a, b):

Λ(h) = ∫ λg(t|h) dt
source
PointProcesses.ground_intensity_boundFunction
ground_intensity_bound(pp, t, h)

Compute a local upper bound on the ground intensity for a temporal point process pp applied to history h at time t.

Return a tuple of the form (B, L) satisfying λg(t|h) ≤ B for all u ∈ [t, t+L).

source
StatsAPI.fitFunction
fit(::Type{PP}, h)
fit(::Type{PP}, histories)

Fit a point process of type PP to one or several histories.

Not implemented by default.

source
PointProcesses.fit_mapFunction
fit_map(::Type{PP}, h, prior)
fit_map(::Type{PP}, histories, prior)

Fit a point process of type PP to one or several histories using maximum a posteriori with a prior.

Not implemented by default.

source

Poisson processes

PointProcesses.AbstractPoissonProcessType
AbstractPoissonProcess{M} <: AbstractPointProcess{M}

Common interface for all temporal Poisson processes, that is, temporal point processes for which the intensity is not a function of past history.

Implements some fallbacks for the AbstractPointProcess interface which accept fewer arguments.

source

Multivariate

Marked

PointProcesses.MarkedPoissonProcessType
MarkedPoissonProcess{M,R,D}

Homogeneous temporal Poisson process with arbitrary mark distribution.

Fields

  • λ::R: event rate.
  • mark_dist::D: mark distribution with sample type M.

Constructor

MarkedPoissonProcess{M}(λ, mark_dist)
source

Index