Skip to content

Commit 13e8d16

Browse files
committed
Add implied constraints from bias to cl
1 parent 323e740 commit 13e8d16

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

pycona/active_algorithms/growacq.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,10 @@ def learn(self, instance: ProblemInstance, oracle: Oracle = UserOracle(), verbos
6767
print(f"\nGrowAcq: calling inner_algorithm for {len(Y)}/{n_vars} variables")
6868
self.env.instance = self.inner_algorithm.learn(self.env.instance, oracle, verbose=verbose, X=Y, metrics=self.env.metrics)
6969

70+
# Add implied constraints from bias to cl
71+
self.env.instance.cl.extend(self.env.instance.bias)
72+
self.env.instance.bias = [] # clear bias
73+
7074
if verbose >= 3:
7175
print("C_L: ", len(self.env.instance.cl))
7276
print("B: ", len(self.env.instance.bias))

0 commit comments

Comments
 (0)