Skip to content

Commit 5d27163

Browse files
committed
bumped up version
1 parent d1e7025 commit 5d27163

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/experiments/functions.jl

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -172,11 +172,12 @@ function update_experiment!(experiment::Experiment, recourse_system::RecourseSys
172172
y′ = reduce(hcat, @.(selectdim(counterfactual_label(results), 3, indices_)))
173173

174174
# If for any counterfactuals the returned label is NaN, this is considered as invalid and the current label is not updated:
175-
chosen_individuals = chosen_individuals[vec(.!(isnan.(y′)))]
175+
valid_ces = vec(.!(isnan.(y′)))
176+
chosen_individuals = chosen_individuals[valid_ces]
176177

177178
# Update data:
178-
X[:, chosen_individuals] = X′
179-
y[:, chosen_individuals] = y′
179+
X[:, chosen_individuals] = X′[:, valid_ces]
180+
y[:, chosen_individuals] = y′[:, valid_ces]
180181

181182
# Generative model:
182183
gen_mod = deepcopy(counterfactual_data.generative_model)

0 commit comments

Comments
 (0)