Open ryanlevy opened 3 years ago
So what you think is most correct. Would be nice to see the impact of this on the example test cases as a minimum.
Khaldoon graciously provided three test cases along with their outputs from MEM i.e. Jarrell Code
.
to be more explicit:
Original Code
is the current releasePatched (1/2chi^2)
is Khaldoon's proposed patch which removes the extra 2/ndat
on lines 89 and 99 of maxent_helper.cppPatched (chi^2/ndat)
carries through the extra factor of 2/ndat
to the objective function Q so its consistent everywhere (changing the Q function )This looks remarkably clean. I'm ok with changing the convention.
Reported by Manuel Zingl and Khaldoon Ghanem (thanks both!) there are some potential subtle problems with definitions. The code seems to use
Q=chi^2 / Ndat - alpha*S
in the minimization routine rather than the reportedQ=1/2chi^2 - alpha*S
Current options:
Ndat
version ofQ
and fixQ
andchi2
functions in the code