-
Notifications
You must be signed in to change notification settings - Fork 7
Add chapter_deza.jl file to class02 #57
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Hi, this is the current draft of the preliminary chapter. Some things I am struggling with and would love some help/comments about:
|
Grade commit f552acd. @klamike please review and:
The grade should be evaluated using the following metric (that sums up to 100 max):
|
Unfortunately, these questions were due prior to the deadline, but @klamike review should help you from now on to get it to the standards we want for the book. |
From what I see, we are missing edits to the chapter main page that would read like a chapter intro to guide the reader. The current version is not up to standards. We don't want lists: https://github.com/LearningToOptimize/LearningToControlClass/blob/main/class02/overview.md. Previous documents have not been removed. Please clean up the folder and files pinged to the documentation. |
|
||
# ╔═╡ a89a5e16-9c64-11f0-3c6f-772fd0a68437 | ||
md""" | ||
## Sections |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ChatGPT loves lists. We want paragraphs that guide the reader through the content.
""" | ||
|
||
# ╔═╡ 00000000-0000-0000-0000-000000000002 | ||
PLUTO_MANIFEST_TOML_CONTENTS = """ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we should use a lecture central project.toml if possible
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LearningToControlClass/class05/class05.jl
Lines 8 to 16 in 81b2067
begin | |
class_dir = @__DIR__ | |
import Pkg | |
Pkg.activate(".") | |
Pkg.instantiate() | |
using PlutoUI | |
using PlutoTeachingTools | |
using MarkdownLiteral | |
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall great start, but still some work to be done before it reaches what I imagine a 100% would look like. Adding the code you showed us in class will go a long way, as well as adjusting wordings to be paragraphs instead of bullet points as Andrew suggested. For more detailed feedbacks, see the comments.
Grade:
(25/33) Readability (use paragraphs, fix math format)
(33/34) Correctness (see comment on Gauss-Newton)
(22/33) Completeness (see comments throughout)
Total: 80/100
Note that I did not review the correctness of all of the math equations in detail due to the formatting issue making it difficult to do so.
Though it should be obvious since I am myself a student, I want to make it clear that this grade is by no means final. Indeed, it is a function of not only the quality of your chapter draft but also my ability to review it. Furthermore, it is my understanding that you have the option of improving the chapter until the end of the semester (which I am happy to help with, too). Thanks again for volunteering for an early class, and for delivering a great, engaging lecture.
* **Learning-based control** wraps optimizers inside training loops (differentiable programming), so smoothness and convergence matter. | ||
|
||
**Mental model (any time step (k))** | ||
State (x_k) → **optimizer** solves a small problem → control (u_k) → plant evolves (x_{k+1}=f(x_k,u_k)). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
State (x_k) → **optimizer** solves a small problem → control (u_k) → plant evolves (x_{k+1}=f(x_k,u_k)). | |
State $x_k$ → **optimizer** solves a small problem → control $u_k$ → plant evolves $x_{k+1}=f(x_k,u_k)$. |
I won't leave comments on all of them but please correct the math syntax throughout all the sections/notebooks. See https://plutojl.org/en/docs/latex/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also maybe a more generic term than "plant" here?
""" | ||
|
||
|
||
# ╔═╡ 46558377-74bc-4453-b2c2-273ccaf3d2d7 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please hide the source for all the markdown cells, and any other cells where the source code is not important. You can do this in the UI by clicking the 👁️ icon on the left of the cell.
You can also do this in the source by looking at the very bottom of the file:
# ╠═46558377-74bc-4453-b2c2-273ccaf3d2d7
# ╟─61fc1519-10c9-4b57-ac8f-4b660c08b39d
The ═
means source is shown, the ─
means it is hidden.
|
||
* **Vector-valued** (g:\mathbb{R}^m\to\mathbb{R}^n) | ||
|
||
* **Jacobian:** (\dfrac{\partial g}{\partial y}\in\mathbb{R}^{n\times m}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider writing out the matrix, so the entries are dg_i/dy_j
# ╔═╡ a65e8de6-8f17-4adb-8359-cbe8a349eff8 | ||
md""" | ||
|
||
""" | ||
|
||
# ╔═╡ 12cbe2ab-9a12-4db6-a044-de0578bb49f3 | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove these empty cells at the end
# ╔═╡ a89a5e16-9c64-11f0-3c6f-772fd0a68437 | ||
md""" | ||
## Sections | ||
- [Root finding](class02_root_finding.jl) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems these links don't work when using Pluto locally. But we can keep this for now and Andrew/I will fix it for the final book. Have you gotten links between Pluto notebooks working @andrewrosemberg ?
|
||
[⬅ Back to overview](class02_overview.jl) | ||
|
||
[➡ Constrained minimization & KKT (next)](class02_constrained_min.jl) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shouldn't this point to sqp?
|
||
**Idea.** Solve a nonlinear constrained problem by repeatedly solving a **quadratic program (QP)** built from local models. | ||
|
||
* Linearize constraints; build a quadratic model of the **Lagrangian/objective**. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is better understood through the lens of linearizing the KKT system like we discussed in class. This makes it much easier to understand why we have a quadratic objective but linear constraints. Currently it makes it seem like a design choice when in fact it follows from the KKT linearization.
|
||
# ╔═╡ 1adff7b2-d86b-4311-9626-22d52057f551 | ||
md""" | ||
## Cell 2 — What is SQP? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove the cell numbers
@@ -0,0 +1,308 @@ | |||
### A Pluto.jl notebook ### |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall: add the code from class and add more detail to the text descriptions. I did not review the math in detail due to format issue.
] | ||
Solve the QP for (d_k), then set (x_{k+1}=x_k+\alpha_k d_k) using a merit/filter/trust-region globalization. | ||
|
||
*(When you add code: plot feasibility (|g|), violation (|h^-|), and objective vs. iteration.)* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add the code
Preliminary draft of my chapter in Pluto. Arnaud will have to update the julia file for Monday Sept 29 (birthday!) with a more complete version of the chapter