Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
cs598mp-fall2021-proj
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
chsieh16
cs598mp-fall2021-proj
Commits
6c759723
Commit
6c759723
authored
1 year ago
by
chsieh16
Browse files
Options
Downloads
Plain Diff
Merge branch 'main' of gitlab.engr.illinois.edu:chsieh16/cs598mp-fall2021-proj into main
parents
54ae78ce
89b73bb4
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
checkPlotWithLearning.py
+75
-0
75 additions, 0 deletions
checkPlotWithLearning.py
with
75 additions
and
0 deletions
checkPlotWithLearning.py
0 → 100644
+
75
−
0
View file @
6c759723
import
numpy
as
np
import
json
from
dtree_synth_gem_stanley
import
load_partitioned_examples
from
gem_stanley_teacher
import
DTreeGEMStanleyGurobiStabilityTeacher
X_LIM
=
np
.
inf
X_ARR
=
np
.
array
([
-
X_LIM
,
X_LIM
])
Y_LIM
=
1.2
NUM_Y_PARTS
=
4
Y_ARR
=
np
.
linspace
(
-
Y_LIM
,
Y_LIM
,
NUM_Y_PARTS
+
1
)
YAW_LIM
=
np
.
pi
/
12
NUM_YAW_PARTS
=
10
YAW_ARR
=
np
.
linspace
(
-
YAW_LIM
,
YAW_LIM
,
NUM_YAW_PARTS
+
1
)
PARTITION
=
(
X_ARR
,
Y_ARR
,
YAW_ARR
)
NORM_ORD
=
2
ULT_BOUND
=
1.0
PKL_FILE_PATH
=
"
data/training/800_truths-uniform_partition_4x20-1.2m-pi_12-one_straight_road-2021-10-27-08-49-17.bag.pickle
"
#teacher = DTreeGEMStanleyGurobiStabilityTeacher(norm_ord=NORM_ORD, ultimate_bound=ULT_BOUND)
#part_to_examples = load_partitioned_examples(
# file_name=PKL_FILE_PATH,
# teacher=teacher, partition=PARTITION
# )
JSON_RES_FILE
=
"
exp_results/gem-stability-concat-ult_bound=1.0/dtree_synth.4x10.out.json
"
teacher
=
DTreeGEMStanleyGurobiStabilityTeacher
(
norm_ord
=
NORM_ORD
,
ultimate_bound
=
ULT_BOUND
)
part_to_examples
=
load_partitioned_examples
(
file_name
=
PKL_FILE_PATH
,
teacher
=
teacher
,
partition
=
PARTITION
)
idx1
=
0
data_list
=
[]
for
part
,
dataset
in
part_to_examples
.
items
():
data_list
.
append
(
part
)
idx1
+=
1
#break
with
open
(
JSON_RES_FILE
)
as
f
:
data
=
json
.
load
(
f
)
idx
=
0
part_res_list
=
[]
for
part_w_res
in
data
:
part_res_list
.
append
(
part_w_res
)
idx
+=
1
# break
assert
len
(
data_list
)
==
len
(
part_res_list
)
for
i
in
range
(
0
,
len
(
data_list
)):
part
=
data_list
[
i
]
part_res
=
part_res_list
[
i
][
"
part
"
]
#part_copy = tuple()
part_copy
=
part
[
0
]
+
part
[
1
]
+
tuple
(
np
.
rad2deg
(
part
[
2
]))
part_res_copy
=
tuple
(
part_res
[
0
])
+
tuple
(
part_res
[
1
])
+
tuple
(
np
.
rad2deg
(
part_res
[
2
]))
print
(
part_copy
)
#print(part_res)
if
part_res_list
[
i
][
"
status
"
]
!=
"
found
"
:
print
(
part_res_copy
)
print
(
part_res_list
[
i
][
"
status
"
])
#print(part_res_list[i]["status"])
print
(
"
-----------------
"
)
#break
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment