
OLS via SVD pseudoinverse (robust to singular X^T X)
Source:R/geron_w4d_native.R
morie_geron_svd_pseudoinverse.Rdtheta = X^+ y = V Sigma^+ U^T y; minimum-norm solution when rank deficient.
Value
list with theta, singular_values, rank, condition_number, residuals, rss, deficient, estimate, n, method.
Examples
V <- c(1, 2, 3, 4, 5, 6, 7, 8)
morie_geron_svd_pseudoinverse(V, V)
#> $theta
#> [1] 1
#>
#> $singular_values
#> [1] 14.28286
#>
#> $rank
#> [1] 1
#>
#> $condition_number
#> [1] 1
#>
#> $residuals
#> [1] 0 0 0 0 0 0 0 0
#>
#> $rss
#> [1] 0
#>
#> $deficient
#> [1] FALSE
#>
#> $estimate
#> [1] 0
#>
#> $n
#> [1] 8
#>
#> $method
#> [1] "Minimum-norm least squares theta = V Sigma^+ U^T y"
#>