double ModelHawkesLogLikSingle::loss_dim_i(const ulong i,
const ArrayDouble &coeffs)
Ln 126 reads:
double loss = -end_time;
This should instead be:
double loss = 0.0;
Think of the case where the infectivity/adjacency matrix is zero everywhere.
This is the case of a mutually independent multi-dimensional Poisson process.
When you take your above function as-is, this adds an erroneous extra sum (= -1 number of dimensions end_time) to the to the negative-log-likelihood.
The negative-log-likelihood for this case is simply:
mu(i)T - N(i) log(mu(i)), summed over each dimension i.
There should' be any -T that is added to each dimension, which is what is happening at the moment.
There seems to be an error in the following function in: https://github.com/X-DataInitiative/tick/blob/master/lib/cpp/hawkes/model/base/model_hawkes_loglik_single.cpp
double ModelHawkesLogLikSingle::loss_dim_i(const ulong i, const ArrayDouble &coeffs)
Ln 126 reads: double loss = -end_time;
This should instead be: double loss = 0.0;
Think of the case where the infectivity/adjacency matrix is zero everywhere. This is the case of a mutually independent multi-dimensional Poisson process. When you take your above function as-is, this adds an erroneous extra sum (= -1 number of dimensions end_time) to the to the negative-log-likelihood. The negative-log-likelihood for this case is simply: mu(i)T - N(i) log(mu(i)), summed over each dimension i. There should' be any -T that is added to each dimension, which is what is happening at the moment.
Thanks, and hope you review and correct this.