Module HawkesPyLib.core.compensator

Functions

def uvhp_expo_compensator(sample_vec: numpy.ndarray, mu: float, eta: float, theta: float) ‑> numpy.ndarray

Computes the compensator for a Hawkes procss with single exponential kernel.

Args

sample_vec : np.ndarray
numpy array of timestamps. Must be non-negative and sorted in ascending order.
mu : float
Background intensity of the Hawkes process. mu > 0
eta : float
Branching ratio of the Hawkes process. 0 < eta < 1
theta : float
Decay speed of the exponential memory kernel. theta > 0

Returns

np.ndarray
numpy array of timestamps
def uvhp_approx_powl_compensator(sample_vec: numpy.ndarray, mu: float, eta: float, alpha: float, tau: float, m: float, M: int) ‑> numpy.ndarray

Computes the compensator for a Hawkes procss with approximate power-law kernel.

Args

sample_vec : np.ndarray
numpy array of timestamps. Must be non-negative and sorted in ascending order.
mu : float
Background intensity of the Hawkes process. mu > 0
eta : float
Branching ratio of the Hawkes process. 0 < eta < 1
alpha : float
Power-law coefficient. alpha > 0
tau : float
Decay speed of the kernel. tau > 0
m : float
Memory kernel parameter, m > 0
M : int
Memory kernel parameter, M > 0

Returns

np.ndarray
numpy array of timestamps
def uvhp_approx_powl_cut_compensator(sample_vec, mu, eta, alpha, tau, m, M) ‑> numpy.ndarray

Computes the compensator for a Hawkes procss with approximate power-law kernel with cutoff.

Args

sample_vec : np.ndarray
numpy array of timestamps. Must be non-negative and sorted in ascending order.
mu : float
background intensity of the Hawkes process
eta : float
Branching ratio of the Hawkes process. 0 < eta < 1
alpha : float
Power-law coefficient. alpha > 0
tau : float
Decay speed of the kernel. tau > 0
m : float
Memory kernel parameter, m > 0
M : int
Memory kernel parameter, M > 0

Returns

np.ndarray
numpy array of timestamps
def uvhp_sum_expo_compensator(sample_vec: numpy.ndarray, mu: float, eta: float, theta_vec: numpy.ndarray) ‑> numpy.ndarray

Computes the compensator for a Hawkes procss with P-sum exponential kernel.

Args

sample_vec : np.ndarray
numpy array of timestamps. Must be non-negative and sorted in ascending order.
mu : float
background intensity of the Hawkes process. mu > 0
eta : float
Branching ratio of the Hawkes process. 0 < eta < 1
theta_vec : np.ndarray
Decay speed of the P exponential memory kernels. theta_vec > 0 all values

Returns

np.ndarray
numpy array of timestamps