Network Hawkes processes in Julia.
MIT License
Network Hawkes processes in Julia.
This package implements methods to simulate and estimate mutually-exciting Hawkes processes with network structure as described in Linderman, 2016. It allows researchers to construct models from a flexible set of model components, run inference from a list of compatible methods (including maximum-likelihood estimation, Markov chain Monte Carlo sampling, and variational inference), and explore results with visualization and diagnostic utilities.
Threads
moduleusing Pkg;
Pkg.add("https://github.com/cswaney/NetworkHawkesProcesses.jl.git")
using NetworkHawkesProcesses
nnodes = 2
weight = 0.1
duration = 1000.0
tmax = 1.0
baseline = NetworkHawkesProcesses.HomogeneousProcess(ones(nnodes))
weights = NetworkHawkesProcesses.DenseWeightModel(weight .* ones(nnodes, nnodes))
impulses = NetworkHawkesProcesses.ExponentialImpulseResponse(ones(nnodes, nnodes))
process = NetworkHawkesProcesses.ContinuousStandardHawkesProcess(baseline, impulses, weights)
data = NetworkHawkesProcesses.rand(process, duration)
ll = NetworkHawkesProcesses.loglikelihood(process, data)
res = NetworkHawkesProcesses.mle!(process, data; verbose=true, regularize=true)
In addition to improved testing and documentation, we plan to add the following features in future releases:
Contributions and feedback are welcome. Please report issues and feature requests to our GitHub page, https://github.com/cswaney/NetworkHawkesProcesses.jl.