Reusable column-scaled QR factorization for ridge-regularized least squares.
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| real(kind=dp), | public, | allocatable | :: | q(:,:) | |||
| real(kind=dp), | public, | allocatable | :: | r(:,:) | |||
| real(kind=dp), | public, | allocatable | :: | col_scale(:) | |||
| integer(kind=i32), | public | :: | mrow | = | 0_i32 | ||
| integer(kind=i32), | public | :: | ncol | = | 0_i32 | ||
| integer(kind=i32), | public | :: | preparation_count | = | 0_i32 |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(regularized_qr_type), | intent(inout) | :: | factorization | |||
| real(kind=dp), | intent(in) | :: | matrix(:,:) | |||
| real(kind=dp), | intent(in) | :: | ridge | |||
| real(kind=dp), | intent(in) | :: | qr_tolerance |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(regularized_qr_type), | intent(in) | :: | factorization | |||
| real(kind=dp), | intent(in) | :: | rhs(:) | |||
| real(kind=dp), | intent(out) | :: | solution(:) |
Re-orthogonalised (two-pass modified Gram-Schmidt) QR of a tall matrix. A column whose residual norm falls below qr_tolerance times its norm (at least 1) gets that floor as its pivot and a zero q column.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=dp), | intent(in) | :: | matrix(:,:) | |||
| real(kind=dp), | intent(out) | :: | q(:,:) | |||
| real(kind=dp), | intent(out) | :: | r(:,:) | |||
| real(kind=dp), | intent(in) | :: | qr_tolerance |