I’m trying to minimize the following -log-likelihood function where i have 6 parameters and 7 equations(N is the nbr of events), but the fit did not converge (it went to the same minimum every time). Here is the code that i’m using:
if (likelihood_event > 0) {
// Accumulate the NLL
nll += -std::log(likelihood_event);
}
Indeed, you have cases where the likelihood_event is negative. How can this happen? Are there maybe even discrete jumps in your cross-section functions? Do you understand these functions well? It’s surprising that the likelihood can be negative, so maybe there is an implementation error?