From db77fe6d208b19d17e043a419bc4269f3680c550 Mon Sep 17 00:00:00 2001 From: Peter Piech Date: Thu, 26 May 2016 10:00:48 -0400 Subject: [PATCH] Revert "Eliminate redundant calculations after incrementing"... ...to prepare for merge of branch "release_revisions" which supersedes the implementation This reverts commit 34390ba769214994a08f23745e639eae1ca2bb8e. --- prefpy/evbwie1.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/prefpy/evbwie1.py b/prefpy/evbwie1.py index d19f51d..9227cf9 100644 --- a/prefpy/evbwie1.py +++ b/prefpy/evbwie1.py @@ -93,7 +93,6 @@ def aggregate(self, rankings, K, epsilon, tot_iters, epsilon_mm, max_iters_em): pi_h = np.copy(pi_h0) inner = tot_iters // max_iters_em - isIncremented = False for g in range(max_iters_em): #for g in range(max_iters): @@ -111,11 +110,9 @@ def aggregate(self, rankings, K, epsilon, tot_iters, epsilon_mm, max_iters_em): z_h1[i][k] = (pi_h[k] * EMMMixPLAggregator.f(x[i], p_h[k])) / denom_sum # M-Step: - if not isIncremented: - test = (g + 1) * inner + (max_iters_em - g - 1) * (inner + 1) - if test < tot_iters: - inner += 1 - isIncremented = True + test = (g + 1) * inner + (max_iters_em - g - 1) * (inner + 1) + if test < tot_iters: + inner += 1 for l in range(inner): #for l in range(max_iters_mm): #for l in range(int(g/50) + 5):