aboutsummaryrefslogtreecommitdiff
path: root/src/likelihood.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/likelihood.c')
-rw-r--r--src/likelihood.c18
1 files changed, 3 insertions, 15 deletions
diff --git a/src/likelihood.c b/src/likelihood.c
index 696b52a..1822553 100644
--- a/src/likelihood.c
+++ b/src/likelihood.c
@@ -1089,24 +1089,12 @@ double nll_best(event *ev)
continue;
}
- /* Technically we should be computing:
+ /* Set the expected number of PE to whatever maximizes P(q|mu), i.e.
*
* mu[i] = max(p(q|mu))
*
- * where by max I mean we find the expected number of PE which
- * maximizes p(q|mu). However, I don't know of any easy analytical
- * solution to this. So instead we just compute the number of PE which
- * maximizes p(q|n). */
- for (j = 1; j < MAX_PE; j++) {
- logp[j] = get_log_pq(ev->pmt_hits[i].qhs,j);
-
- if (j == 1 || logp[j] > max_logp) {
- maxj = j;
- max_logp = logp[j];
- }
- }
-
- mu[i] = maxj;
+ */
+ mu[i] = get_most_likely_mean_pe(ev->pmt_hits[i].qhs);
ts[i] = ev->pmt_hits[i].t;
}