Skip to content

Commit

Permalink
fixed bug in training of only loc or scale model in numpy
Browse files Browse the repository at this point in the history
  • Loading branch information
davidsebfischer committed Feb 26, 2020
1 parent 4f19e21 commit d3287b3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions batchglm/train/numpy/base_glm/estimator.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ def train(
b_var_new[:, idx_bad_step] = b_var_new[:, idx_bad_step] - b_step[:, idx_bad_step]
self.model.b_var = b_var_new
else:
ll_proposal = ll_current
ll_proposal = ll_current[idx_update]
idx_bad_step = np.array([], dtype=np.int32)
# Update likelihood vector with updated genes based on already evaluated proposal likelihood.
ll_new = ll_current.copy()
Expand All @@ -149,7 +149,7 @@ def train(
a_var_new[:, idx_bad_step] = a_var_new[:, idx_bad_step] - a_step[:, idx_bad_step]
self.model.a_var = a_var_new
else:
ll_proposal = ll_current
ll_proposal = ll_current[idx_update]
idx_bad_step = np.array([], dtype=np.int32)
# Update likelihood vector with updated genes based on already evaluated proposal likelihood.
ll_new = ll_current.copy()
Expand Down

0 comments on commit d3287b3

Please sign in to comment.