ID EN
Miscellaneous

kappa

R Base 3.6.2 🇮🇩 Bahasa Indonesia

Bilangan syarat suatu matriks beraturan (persegi) adalah hasil kali norma matriks dan norma inversnya (atau invers semu), dan karenanya bergantung pada jenis norma matriks. kappa() menghitung secara default (perkiraan) bilangan kondisi 2 norma dari sebuah matriks atau matriks \(R\) dari dekomposisi \(QR\), mungkin memiliki kesesuaian linier. Bilangan syarat 2 norma dapat ditunjukkan sebagai perbandingan nilai singular bukan nol terbesar dan terkecil dari matriks. rcond() menghitung perkiraan nomor kondisi timbal balik, lihat detailnya.

Syntax

R
kappa(z, …)
# S3 method for default
kappa(z, exact = FALSE,
      norm = NULL, method = c("qr", "direct"), …)
# S3 method for lm
kappa(z, …)
# S3 method for qr
kappa(z, &#8230;)<p></p><p>.kappa_tri(z, exact = FALSE, LINPACK = TRUE, norm = NULL, &#8230;)</p><p>rcond(x, norm = c("O","I","1"), triangular = FALSE, &#8230;)</p>

Arguments

Parameter Deskripsi
z, x A matrix or a the result of qr or a fit from a class inheriting from "lm".
exact logical. Should the result be exact?
norm character string, specifying the matrix norm with respect to which the condition number is to be computed, see also norm. For rcond, the default is "O", meaning the One- or 1-norm. The (currently only) other possible value is "I" for the infinity norm.
method a partially matched character string specifying the method to be used; "qr" is the default for back-compatibility, mainly.
triangular logical. If true, the matrix used is just the lower triangular part of z.
LINPACK logical. If true and z is not complex, the LINPACK routine dtrco() is called; otherwise the relevant LAPACK routine is.
&#8230; further arguments passed to or from other methods; for kappa.*(), notably LINPACK when norm is not "2".

Return Value

Nomor kondisi, \(kappa\), atau perkiraan jika tepat = FALSE.

Details

Untuk kappa(), jika tepat = FALSE (default) maka angka kondisi 2 norma diperkirakan dengan perkiraan yang murah. Namun, penghitungan pastinya (melalui svd) juga mungkin cukup cepat. Perhatikan bahwa angka kondisi 1- dan Inf-norm jauh lebih cepat untuk dihitung, dan rcond() menghitung angka kondisi timbal balik ini, juga untuk matriks kompleks, menggunakan rutinitas LAPACK standar. kappa dan rcond adalah antarmuka berbeda dengan fungsi yang sebagian identik. .kappa_tri adalah fungsi internal yang dipanggil oleh kappa.qr dan kappa.default. Hasil yang gagal dari kode LAPACK yang mendasarinya akan menghasilkan kesalahan yang memberikan kode kesalahan positif: ini hanya dapat diinterpretasikan dengan mempelajari kode FORTRAN secara mendetail.

Contoh

Example
R
# NOT RUN {
kappa(x1 <- cbind(1, 1:10)) # 15.71
kappa(x1, exact = TRUE)        # 13.68
kappa(x2 <- cbind(x1, 2:11)) # high! [x2 is singular!]

hilbert <- function(n) { i <- 1:n; 1 / outer(i - 1, i, "+") }
sv9 <- svd(h9 <- hilbert(9))$ d
kappa(h9)  # pretty high!
kappa(h9, exact = TRUE) == max(sv9) / min(sv9)
kappa(h9, exact = TRUE) / kappa(h9)  # 0.677 (i.e., rel.error = 32%)
# }

See Also

norm; svd for the singular value decomposition and qr for the \(QR\) one.