From 219b84fdaa2f1460d145bfe7abefdc2789d7607e Mon Sep 17 00:00:00 2001 From: Angello Astorga <aastorg2@illinois.edu> Date: Tue, 25 Oct 2022 23:01:06 -0500 Subject: [PATCH] rename method consistent with terminology --- dtree_synth.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dtree_synth.py b/dtree_synth.py index 580f5ed..0afb646 100755 --- a/dtree_synth.py +++ b/dtree_synth.py @@ -115,7 +115,7 @@ def load_partitioned_examples(file_name: str, teacher: Teacher, partition) \ ret[part][2] += 1 #TODO note, isin't variable _ being passed to is_positive. # isint _ ground truth for each s in ss? - elif teacher.is_positive_example(s): + elif teacher.is_safe_state(s): ret[part][0].append(s) else: ret[part][1].append(s) @@ -164,6 +164,7 @@ def main(dim:str, bnd_relax:float ): print(f"Part Index {i}:", f"y in [{lb[1]:.03}, {ub[1]:.03}] (m);", f"θ in [{lb[2]:.03}, {ub[2]:.03}] (deg);", f"# safe: {len(safe_dps)}", f"# unsafe: {len(unsafe_dps):03}", f"# NaN: {num_nan}") + result = [] for i, (part, (safe_dps, unsafe_dps, num_nan)) in enumerate(part_to_examples.items()): #if not i == 1: -- GitLab