You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Given a `spmat` structure representing some sparse matrix `A`, return the block matrix `(A √α)` as a `qrm_shifted_spmat` type. See `qrm_shifted_spmat` for more information.
532
+
This can be especially useful when `A` is rank deficient, as choosing `α > 0` acts as a regularization.
533
+
534
+
### Input Arguments
535
+
* `spmat`: the input matrix
536
+
* `α ≥ 0`: the regularization parameter (note the square root in the block matrix representation).
537
+
"""
538
+
function qrm_shift_spmat end
539
+
540
+
@docraw"""
541
+
qrm_update_shift_spmat!(shifted_spmat, α)
542
+
543
+
Given a `shifted` block matrix of the form `(A √α)`, update the parameter `α` in the matrix.
544
+
### Input Arguments
545
+
* `shifted_spmat`: the input matrix of the qrm_shifted_spmat type. See `qrm_shifted_spmat` for more information.
546
+
* `α ≥ 0`: the regularization parameter (note the square root in the block matrix representation).
547
+
"""
548
+
function qrm_update_shift_spmat! end
549
+
550
+
@docraw"""
551
+
x = qrm_golub_riley(spmat, b)
552
+
553
+
### Input Arguments :
554
+
* `spmat`: the input matrix of the ill-conditionned system `Ax = b`.
Given a (possibly ill-conditionned or rank deficient) system `Ax = b` where `A` can have any shape `m×n`, compute `x = A†b = Aᵀ(AAᵀ)†b` where `A†` is the Moore-Penrose pseudoinverse of `A`.
564
+
565
+
### Input Arguments :
566
+
567
+
* `shifted_spmat`: a `qrm_shifted_spmat` type representing the matrix `(A √α)` where `α` is a regularization parameter for the Golub-Riley iteration. See `qrm_shift_spmat` for more information.
568
+
* `spfct`: a sparse factorization object of type `qrm_spfct`.
569
+
* `x`: the approximate solution vector x := A†b = Aᵀy, the size of this vector is n+m, its values are overwritten by this function and it can be uninitialized when the function is called.
570
+
* `b`: the RHS vector of the linear system, the size of this vector is m.
571
+
* `Δx`: an auxiliary vector used to compute the solution, the size of this vector is n+m and can be uninitialized when the function is called.
572
+
* `y`: the vector used to compute y := (AAᵀ)†b, the size of this vector is n and can be uninitialized when the function is called.
573
+
* `Δy`: an auxiliary vector used to compute the solution, the size of this vector is n and can be uninitialized when the function is called.
574
+
575
+
The definition of the `shifted_spmat` may look odd at first sight. We use such a block matrix as an argument of `qrm_golub_riley!` because the QR factorization of this matrix has the property that
576
+
`RᵀR = AᵀA + αI` which is the system we need to repeatedly solve from for the Golub-Riley iteration.
577
+
578
+
The Golub-Riley method works as follows:
579
+
580
+
* Given A and b, choose a fixed regularization parameter `α > 0` and let x := 0.
581
+
* At each iteration, compute Δx := Aᵀ(AAᵀ + αI)⁻¹ (b - Ax), and update x := x + Δx.
582
+
583
+
This method has the advantage of only costing one QR-factorization of the `qrm_shifted_spmat` matrix.
584
+
For more details, see
585
+
A. Dax and L. Eldén, Approximating minimum norm solutions of rank-deficient least squares problems, Numerical Linear Algebra with Applications, 5, pp. 79-99, 1998, DOI 10.1002/(SICI)1099-1506(199803/04)5:2<79::AID-NLA126>3.0.CO;2-4
functionqrm_golub_riley(spmat ::qrm_spmat{T}, b ::AbstractVector{T}; α ::T=T(eps(real(T))), max_iter ::Int=50, tol ::Real=eps(real(T)), transp ::Char='n') where T
This data type represents a "shifted" matrix. When one wants to solve a "regularized" problem of the form `(AᵀA + αI)x = b`,
40
+
one can use a QR factorization of the block matrix `QR = (A √α)ᵀ` and note that `RᵀR = AᵀA + αI`. This type of problem is especially useful when `A` is poorly conditioned or rank deficient.
41
+
It only contains a `qrm_spmat` matrix representing the above block matrix and the regularization parameter `α`.
0 commit comments