-
Notifications
You must be signed in to change notification settings - Fork 6
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
Add Q-less tutorial #105
base: main
Are you sure you want to change the base?
Add Q-less tutorial #105
Conversation
Please add text to describe that the examples are showing. It would also be useful to show how to use iterative refinement and compare the residuals and errors with and without it. |
Thanks @MaxenceGollier for adding a tutorial! I have the following suggestions:
For the iterative refinement, we need to use |
Thanks @MaxenceGollier ! |
@amontoison why can't you do the solves using |
In the first example, |
@MaxenceGollier I get that. What I'm saying is that |
You're right, we can. I was thinking of something else when I answered. We also don't need to call |
What do you think now @dpo @amontoison @abuttari ? |
Let's illustrate iterative refinement here, or else this tutorial is misleading. Also add a reference to Björck's paper where it is justified. |
@dpo I have added iterative refinement now. |
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.
I added suggestions to make the examples look more like a tutorial and be more didactic. Also, there seem to be extra steps.
Please modify example 2 accordingly.
docs/src/tutorials/qless.md
Outdated
|
||
# Overall, RᵀRy₂ = b. Equivalently, RᵀQᵀQRy₂ = b or AAᵀy₂ = b | ||
|
||
# Compute least norm solution of min ‖b - Ay‖ |
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.
I’m confused. This step doesn’t belong in the solution of the least-norm problem.
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.
See this comment. I am not sure if this answers your question @dpo ?
Thanks @MaxenceGollier ! I believe there is a mistake in the first example:
y_star
andy\_2
have to be of size n(=7) instead of m(=5). In fact you cannot computenorm(A*y\_2-b)
because of incompatible dimensions. The actual least-norm solution isy\_3=A'*y\_2
. Have I missed something?
Co-authored-by: Dominique <[email protected]>
Co-authored-by: Dominique <[email protected]>
docs/src/tutorials/qless.md
Outdated
# This procedure is backward stable if we perform one step of iterative refinement---see | ||
# | ||
# Å. Björck, Stability analysis of the method of seminormal equations for linear least squares problems, | ||
# Linear Algebra and its Applications, 88–89, pp. 31-48, 1987, DOI 10.1016/0024-3795(87)90101-7. |
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.
Sorry, this needs to be adjusted. The method of seminormal equations for the least-norm problem is analyzed in by Paige in https://www.ams.org/journals/mcom/1973-27-122/S0025-5718-1973-0331745-1.
For normal equations, the stability with and without Q is similar.
But it's not the same for least squares. It's only for least squares that we need iterative refinement. I think it would be useful to write functions that solve those problems and hide the details.
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.
I will add iterative refinement in a separate PR.
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.
I'm saying the text needs to be adjusted too.
I think this is ready for a merge now, what do you think @dpo ? |
Co-authored-by: Dominique <[email protected]>
Added two examples for solving
$AA^T y = b$ and $A^T A x = A^Tb$ without $Q$ .
What do you think @amontoison ?