tick.hawkes.HawkesKernelSumExp

class tick.hawkes.HawkesKernelSumExp(intensities, decays)[source]

Hawkes kernel with sum exponential decays

\[\phi(t) = \sum_{u=1}^{U} \alpha_u \beta_u \exp (- \beta_u t) 1_{t > 0}\]

where \(\alpha_u\) are the intensity of the kernel and \(\beta_u\) its decays.

Parameters

intensities : np.ndarray, shape = (n_decays, )

Intensity of the kernel, also noted \(\alpha\)

decays : np.ndarray, shape = (n_decays, )

Decay of the kernel, also noted \(\beta\)

Attributes

n_decays : int

Number of decays of the kernel, also noted \(U\)

__init__(intensities, decays)[source]

Initialize self. See help(type(self)) for accurate signature.

get_norm(n_steps=10000)

Computes L1 norm

Parameters

n_steps : int

number of steps used for integral discretization

Notes

By default it approximates Riemann sum with step-wise function. It might be overloaded if L1 norm closed formula exists

get_plot_support()

Returns support used to plot the kernel

get_support()

Returns the upperbound of the support

get_value(t)

Returns the value of the kernel at t

get_values(t_values)

Returns the value of the kernel for all times in t_values

is_zero()

Returns if this kernel is equal to 0

Examples using tick.hawkes.HawkesKernelSumExp