Hawkes process model for sum-exponential kernels with fixed and given decays. It is modeled with least square loss:
where \(\lambda_i\) is the intensity:
where
\(D\) is the number of nodes
\(\mu_i(t)\) are the baseline intensities
\(\phi_{ij}\) are the kernels
\(t_k^j\) are the timestamps of all events of node \(j\)
and with a sum-exponential parametrisation of the kernels
In our implementation we denote:
Integer \(D\) by the attribute n_nodes
Integer \(U\) by the attribute n_decays
Vector \(\beta \in \mathbb{R}^{U}\) by the
parameter decays. This parameter is given to the model
decays : numpy.ndarray, shape=(n_decays, )
An array giving the different decays of the exponentials kernels.
n_baselines : int, default=1
In this model baseline is supposed to be either constant or piecewise constant. If
n_baseline > 1then piecewise constant setting is enabled. In this case \(\mu_i(t)\) is piecewise constant on intervals of sizeperiod_length / n_baselinesand periodic.
period_length : float, default=None
In piecewise constant setting this denotes the period of the piecewise constant baseline function.
approx : int, default=0 (read-only)
Level of approximation used for computing exponential functions
if 0: no approximation
if 1: a fast approximated exponential function is used
n_threads : int, default=-1 (read-only)
Number of threads used for parallel computation.
if
int <= 0: the number of threads available on the CPUotherwise the desired number of threads
n_nodes : int (read-only)
Number of components, or dimension of the Hawkes model
n_decays : int (read-only)
Number of decays used in the sum-exponential kernel
baseline_intervals : np.ndarray, shape=(n_baselines)
Start time of each interval on which baseline is piecewise constant.
data : list of numpy.array (read-only)
The events given to the model through
fitmethod. Note that data given throughincremental_fitis not stored