Module HawkesPyLib.core.intensity
Functions
def generate_eval_grid(step_size: float, T: float) ‑> numpy.ndarray
-
Generates an equidistant grid in the closed interval [0, T] with step size given by step_size.
Args
step_size
:float
- Step size of the equidistant grid.
T
:float
- End point of the equidistant grid (the last value).
Returns
np.ndarray
- 1d array equidistant grid between from 0 to t with step size.
def uvhp_expo_intensity(sample_vec: numpy.ndarray, grid: numpy.ndarray, mu: float, eta: float, theta: float) ‑> numpy.ndarray
-
Evaluation of the intensity function of a univariate Hawkes process with single exponential kernel
Args
sample_vec
:np.ndarray
- Jump times of the Hawkes process. Must be non-negative and in ascending order!
grid
:np.ndarray
- Times at which the intensity function is evaluated at. Must be non-negative and 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 single exponential kernel, theta > 0
Returns
np.ndarray
- A 2d numpy array of timestamps (column 0) and corresponding intensity values (column 1)
def uvhp_sum_expo_intensity(sample_vec: numpy.ndarray, grid: numpy.ndarray, mu: float, eta: float, theta_vec: numpy.ndarray) ‑> numpy.ndarray
-
Evaluation of the intensity function of a univariate Hawkes process with P-sum exponential kernel
Args
sample_vec
:np.ndarray
- Jump times of the Hawkes process. Must be non-negative and in ascending order!
grid
:np.ndarray
- Times at which the intensity function is evaluated at. Must be non-negative and 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
- Array of decay speeds of the P-sum exponential kernel, theta_k > 0
Returns
np.ndarray
- A 2d numpy array of timestamps (column 0) and corresponding intensity values (column 1)
def uvhp_approx_powl_cutoff_intensity(sample_vec: numpy.ndarray, grid: numpy.ndarray, mu: float, eta: float, alpha: float, tau: float, m: float, M: int) ‑> numpy.ndarray
-
Evaluation of the intensity function of a univariate Hawkes process with approximate power-law kernel with smooth cutoff component
Args
sample_vec
:np.ndarray
- Jump times of the Hawkes process. Must be non-negative and in ascending order!
grid
:np.ndarray
- Times at which the intensity function is evaluated at. Must be non-negative and 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
- Approximate location of cutoff, tau > 0
m
:float
- Approximate power-law parameter, m > 0
M
:int
- Number of weighted exponential kernels that approximate the power-law
Returns
np.ndarray
- A 2d numpy array of timestamps (column 0) and corresponding intensity values (column 1)
def uvhp_approx_powl_intensity(sample_vec: numpy.ndarray, grid: numpy.ndarray, mu: float, eta: float, alpha: float, tau: float, m: float, M: int) ‑> numpy.ndarray
-
Evaluation of the intensity function of a univariate Hawkes process with approximate power-law kernel.
Args
sample_vec
:np.ndarray
- Jump times of the Hawkes process. Must be non-negative and in ascending order!
grid
:np.ndarray
- Times at which the intensity function is evaluated at. Must be non-negative and 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
- Approximate location of cutoff, tau > 0
m
:float
- Approximate power-law parameter, m > 0
M
:int
- Number of weighted exponential kernels that approximate the power-law
Returns
np.ndarray
- A 2d numpy array of timestamps (column 0) and corresponding intensity values (column 1)