Skip to content

Commit

Permalink
Revert "Eliminate redundant calculations after incrementing"...
Browse files Browse the repository at this point in the history
...to prepare for merge of branch "release_revisions" which supersedes the implementation

This reverts commit 34390ba.
  • Loading branch information
pdpiech committed May 26, 2016
1 parent 34390ba commit db77fe6
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions prefpy/evbwie1.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand All @@ -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):
Expand Down

0 comments on commit db77fe6

Please sign in to comment.