diff options
| author | tlatorre <tlatorre@uchicago.edu> | 2018-10-18 09:53:37 -0500 |
|---|---|---|
| committer | tlatorre <tlatorre@uchicago.edu> | 2018-10-18 09:53:37 -0500 |
| commit | 11a22cf650448e113d4fd16c51822dc23b9c1a33 (patch) | |
| tree | f70c287a611130793d31a86acd9793a5d57bba02 /src/misc.h | |
| parent | 54da09d3ec8266a5e8b95842951ddb0a67c26255 (diff) | |
| download | sddm-11a22cf650448e113d4fd16c51822dc23b9c1a33.tar.gz sddm-11a22cf650448e113d4fd16c51822dc23b9c1a33.tar.bz2 sddm-11a22cf650448e113d4fd16c51822dc23b9c1a33.zip | |
fix the likelihood function to return the *negative* log likelihood of the path coefficients
Previously I was adding the log likelihood of the path coefficients instead of
the *negative* log likelihood! When fitting electrons this would sometimes
cause the fit to become unstable and continue increasing the path coefficients
without bound since the gain in the likelihood caused by increasing the
coefficients was more than the loss caused by a worse fit to the PMT data.
Doh!
Diffstat (limited to 'src/misc.h')
| -rw-r--r-- | src/misc.h | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -14,6 +14,7 @@ double interp1d(double x, double *xp, double *yp, size_t n); int isclose(double a, double b, double rel_tol, double abs_tol); int allclose(double *a, double *b, size_t n, double rel_tol, double abs_tol); double logsumexp(double *a, size_t n); +double log_norm(double x, double mu, double sigma); double norm(double x, double mu, double sigma); double norm_cdf(double x, double mu, double sigma); double mean(const double *x, size_t n); |
