Skip to content

Commit d3287b3

Browse files
fixed bug in training of only loc or scale model in numpy
1 parent 4f19e21 commit d3287b3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

batchglm/train/numpy/base_glm/estimator.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ def train(
123123
b_var_new[:, idx_bad_step] = b_var_new[:, idx_bad_step] - b_step[:, idx_bad_step]
124124
self.model.b_var = b_var_new
125125
else:
126-
ll_proposal = ll_current
126+
ll_proposal = ll_current[idx_update]
127127
idx_bad_step = np.array([], dtype=np.int32)
128128
# Update likelihood vector with updated genes based on already evaluated proposal likelihood.
129129
ll_new = ll_current.copy()
@@ -149,7 +149,7 @@ def train(
149149
a_var_new[:, idx_bad_step] = a_var_new[:, idx_bad_step] - a_step[:, idx_bad_step]
150150
self.model.a_var = a_var_new
151151
else:
152-
ll_proposal = ll_current
152+
ll_proposal = ll_current[idx_update]
153153
idx_bad_step = np.array([], dtype=np.int32)
154154
# Update likelihood vector with updated genes based on already evaluated proposal likelihood.
155155
ll_new = ll_current.copy()

0 commit comments

Comments
 (0)