Skip to content

Commit eae32af

Browse files
committed
Fix bug in categorical gene types
1 parent 0d9b1d7 commit eae32af

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

causal_testing/surrogate/surrogate_search_algorithms.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,10 @@ def create_gene_types(
102102
if rel_split[1] == ">=":
103103
var_space[rel_split[0]]["low"] = int(rel_split[2])
104104
elif rel_split[1] == "<=":
105-
var_space[rel_split[0]]["high"] = int(rel_split[2])
105+
if specification.scenario.variables.get(rel_split[0]).datatype == int:
106+
var_space[rel_split[0]]["high"] = int(rel_split[2]) + 1
107+
else:
108+
var_space[rel_split[0]]["high"] = int(rel_split[2])
106109

107110
gene_space = []
108111
gene_space.append(var_space[surrogate_model.treatment])

0 commit comments

Comments
 (0)