Module HawkesPyLib.core.logll
Functions
def uvhp_expo_logL(param_vec: numpy.ndarray, sample_vec: numpy.ndarray, tn: float) ‑> float
-
Log-likelihood function for a Hawkes Process with single exponential kernel
Args
param_vec
:np.ndarray
- array of parameter: [mu, eta, theta]
sample_vec
:np.ndarray
- array of timestamps. Must be sorted in ascending order. All timestamps must be positive.
tn
:float
- End time of the Hawkes process. Must be larger or equal than the last timestamp i.e. tn >= sample_vec[-1]
Returns
float
- The negative log-likelihood value
def uvhp_expo_logL_grad(param_vec: numpy.ndarray, sample_vec: numpy.ndarray, tn: float) ‑> numpy.ndarray
-
Gradient of the log-likelihood function for a Hawkes Process with single exponential kernel
Args
param_vec
:np.ndarray
- array of parameter: [mu, eta, theta]
sample_vec
:np.ndarray
- array of timestamps. Must be sorted in ascending order. All timestamps must be positive.
tn
:float
- End time of the Hawkes process. Must be larger or equal than the last timestamp i.e. tn >= sample_vec[-1]
Returns
np.ndarray
- The negative value of each gradient: [mu gradient, eta gradient, theta gradient]
def uvhp_sum_expo_logL(param_vec: numpy.ndarray, sample_vec: numpy.ndarray, tn: float) ‑> float
-
Log-likelihood function for a Hawkes Process with P-sum exponential kernel
Args
param_vec
:np.ndarray
- array of parameter: [mu, eta, theta1, theta2, …, thetaP]
sample_vec
:np.ndarray
- array of timestamps. Must be sorted in ascending order. All timestamps must be positive.
tn
:float
- End time of the Hawkes process. Must be larger or equal than the last timestamp i.e. tn >= sample_vec[-1]
Returns
float
- The negative log-likelihood value
def uvhp_sum_expo_logL_grad(param_vec: numpy.ndarray, sample_vec: numpy.ndarray, tn: float) ‑> numpy.ndarray
-
Gradient of the log-likelihood function for a Hawkes Process with P-sum exponential kernel
Args
param_vec
:np.ndarray
- array of parameter: [mu, eta, theta1, theta2, …, thetaP]
sample_vec
:np.ndarray
- array of timestamps. Must be sorted in ascending order. All timestamps must be positive.
tn
:float
- End time of the Hawkes process. Must be larger or equal than the last timestamp i.e. tn >= sample_vec[-1]
Returns
np.ndarray
- The negative value of each gradient: [mu gradient, eta gradient, theta1 gradient, …, thetaP gradient]
def uvhp_approx_powl_cut_logL(param_vec: numpy.ndarray, sample_vec: numpy.ndarray, tn: float, m: float, M: int) ‑> float
-
Log-likelihood function for a Hawkes Process with approximate power-law kernel with cutoff component
Args
param_vec
:np.ndarray
- array of parameter: [mu, eta, theta1, theta2, …, thetaP]
sample_vec
:np.ndarray
- array of timestamps. Must be sorted in ascending order. All timestamps must be positive.
tn
:float
- End time of the Hawkes process. Must be larger or equal than the last timestamp i.e. tn >= sample_vec[-1]
m
:float
- Fixed kernel variable
M
:int
- Fixed kernel variable
Returns
float
- negative log-likelihood value
def uvhp_approx_powl_logL(param_vec: numpy.ndarray, sample_vec: numpy.ndarray, tn: float, m: float, M: int) ‑> float
-
Log-likelihood function for a Hawkes Process with approximate power-law kernel without cutoff component
Args
param_vec
:np.ndarray
- array of parameter: [mu, eta, theta1, theta2, …, thetaP]
sample_vec
:np.ndarray
- array of timestamps. Must be sorted in ascending order. All timestamps must be positive.
tn
:float
- End time of the Hawkes process. Must be larger or equal than the last timestamp i.e. tn >= sample_vec[-1]
m
:float
- Fixed kernel variable
M
:int
- Fixed kernel variable
Returns
float
- negative log-likelihood value