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
bb5a5877
Commit
bb5a5877
authored
2 years ago
by
chsieh16
Browse files
Options
Downloads
Patches
Plain Diff
Add documentation
parent
5b70ef42
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
debugging_notes.txt
+8
-0
8 additions, 0 deletions
debugging_notes.txt
dtree_synth.py
+5
-1
5 additions, 1 deletion
dtree_synth.py
with
13 additions
and
1 deletion
debugging_notes.txt
+
8
−
0
View file @
bb5a5877
# April 20, 2022
iteration: 199
candidate: ITE(1.0*x_2 + z_1 <= -0.0088842, False, 1.0*x_1 + 1.0*x_2 + z_0 + z_1 > -0.5997313)
debugging notes: (high level )
Gurobi cannot express < , > (strickly less than or strickly greater than)
...
...
This diff is collapsed.
Click to expand it.
dtree_synth.py
+
5
−
1
View file @
bb5a5877
...
...
@@ -45,7 +45,7 @@ def test_synth_dtree():
# 0.0 <= x <= 30.0 and -1.0 <= y <= 0.9 and 0.2 <= theta <= 0.22
teacher
.
set_old_state_bound
(
lb
=
[
0.0
,
-
1.0
,
0.2
],
ub
=
[
30.0
,
-
0.9
,
0.22
])
synth_dtree
(
positive_examples
,
teacher
,
num_max_iterations
=
1
0
)
synth_dtree
(
positive_examples
,
teacher
,
num_max_iterations
=
200
0
)
def
synth_dtree
(
positive_examples
,
teacher
,
num_max_iterations
:
int
=
10
):
...
...
@@ -55,6 +55,10 @@ def synth_dtree(positive_examples, teacher, num_max_iterations: int = 10):
a_mat_0
=
np
.
array
([[
0.
,
-
1.
,
0.
],
[
0.
,
0.
,
-
1.
]])
b_vec_0
=
np
.
zeros
(
2
)
# Let z = [z_0, z_1] = [d, psi]; x = [x_0, x_1, x_2] = [x, y, theta]
# a_mat_0 @ [x, y, theta] + b_vec_0 = [-y, -theta]
# z - (a_mat_0 @ x + b_vec_0) = [d, psi] - [-y, -theta] = [d+y, psi+theta] defined as [fvar0_A0, fvar1_A0]
learner
.
set_grammar
([(
a_mat_0
,
b_vec_0
)])
learner
.
add_positive_examples
(
*
positive_examples
)
...
...
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