diff --git a/region_synth.py b/region_synth.py index bf04d621499bbc0abc9a1bbc32491d908cba6459..ef48b51d0302bfc0dd72d42e2b4c058cb6ec2de6 100644 --- a/region_synth.py +++ b/region_synth.py @@ -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]) positive_examples = positive_examples[:20:] print("#examples: %d" % len(positive_examples)) @@ -48,9 +49,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)