Skip to content
Snippets Groups Projects
Commit 8e6aab93 authored by chsieh16's avatar chsieh16
Browse files

Add bound on the negative examples from teacher

parent d5b4e8a2
No related branches found
No related tags found
No related merge requests found
......@@ -31,6 +31,7 @@ def test_synth_region():
i_th = 0 # select only the i-th partition
truth_samples_seq = truth_samples_seq[i_th:i_th+1]
print("Representative point in partition:", truth_samples_seq[0][0])
truth_samples_seq = [(t, [s for s in raw_samples if not any(np.isnan(s))])
for t, raw_samples in truth_samples_seq]
......@@ -38,7 +39,7 @@ def test_synth_region():
positive_examples: List[Tuple[float, ...]] = [
s for _, samples in truth_samples_seq for s in samples
]
ex_dim = len(positive_examples[0])
print("#examples: %d" % len(positive_examples))
print("Dimension of each example: %d" % ex_dim)
......@@ -47,9 +48,8 @@ def test_synth_region():
teacher = Teacher()
assert teacher.state_dim + teacher.perc_dim == ex_dim
# x >= 6.0 and y >= 5
# teacher.set_old_state_bound(lb=[6.0, 5.0], ub=[11.0, 10.0])
#[::20]
# 0.0 <= x <= 30.0 and 0.9 <= y <= 1.0 and -0.2 <= theta <= -0.22
teacher.set_old_state_bound(lb=[0.0, 0.9, -0.22], ub=[30.0, 1.0, -0.2])
synth_region(positive_examples, teacher, num_max_iterations=20)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment