A class that implements parametric inference for Hawkes processes with parametrisation of the kernels as sum of Gaussian basis functions and a mix of Lasso and group-lasso regularization
Hawkes processes are point processes defined by the intensity:
where
\(D\) is the number of nodes
\(\mu_i\) are the baseline intensities
\(\phi_{ij}\) are the kernels
\(t_k^j\) are the timestamps of all events of node \(j\)
and with an parametrisation of the kernels as sum of Gaussian basis functions
In our implementation we denote:
Integer \(D\) by the attribute n_nodes
Vector \(\mu \in \mathbb{R}^{D}\) by the attribute
baseline
Vector \((t_m) \in \mathbb{R}^{M}\) by the variable
means_gaussians
Number \(\sigma\) by the variable std_gaussian
Tensor
\(A = (\alpha^{ij}_m)_{ijm} \in \mathbb{R}^{D \times D \times M}\)
by the attribute amplitudes
max_mean_gaussian : float
The mean of the last Gaussian basis function. This can be considered a proxy of the kernel support.
n_gaussians : int
The number of Gaussian basis functions used to approximate each kernel.
step_size : float
The step-size used in the optimization for the EM algorithm.
C : float, default=1e3
Level of penalization
lasso_grouplasso_ratio : float, default=0.5
Ratio of Lasso-Nuclear regularization mixing parameter with 0 <= ratio <= 1.
For ratio = 0 this is Group-Lasso regularization
For ratio = 1 this is lasso (L1) regularization
For 0 < ratio < 1, the regularization is a linear combination of Lasso and Group-Lasso.
max_iter : int, default=50
Maximum number of iterations of the solving algorithm
tol : float, default=1e-5
The tolerance of the solving algorithm (iterations stop when the stopping criterion is below it). If not reached it does
max_iteriterations
n_threads : int, default=1
Number of threads used for parallel computation.
verbose : bool, default=False
If
True, we verbose things
if
int <= 0: the number of physical cores available on the CPUotherwise the desired number of threads
print_every : int, default=10
Print history information when
n_iter(iteration number) is a multiple ofprint_every
record_every : int, default=10
Record history information when
n_iter(iteration number) is a multiple ofrecord_every
n_nodes : int
Number of nodes / components in the Hawkes model
baseline : np.array, shape=(n_nodes,)
Inferred baseline of each component’s intensity
amplitudes : np.ndarray, shape=(n_nodes, n_nodes, n_gaussians)
Inferred adjacency matrix
means_gaussians : np.array, shape=(n_gaussians,)
The means of the Gaussian basis functions.
std_gaussian : float
The standard deviation of each Gaussian basis function.
References
Xu, Farajtabar, and Zha (2016, June) in ICML, Learning Granger Causality for Hawkes Processes.
tick.hawkes.HawkesSumGaussians¶