16.12.2008
Wiederholung Gegeben: Matrix A m n Paar Rechter Eigenvektor x, Eigenwert λ: A x = λ x mit x R n \ 0, λ N Paar Linker Eigenvektor y, Eigenwert λ: y T A = λ y T Singulärwertzerlegung (SVD): A = UΣV T = n i=1 σ i u i v T i Rang: rank(a) = {σ σ > 0} min(m, n) k i=1 σ i u i v T i = A k
Least Squares Problem Gegeben: überbestimmtes LGS Ax = b ohne Lösung (m > n) Gesucht: Approximative Lösung für x in Ax b = r (1) durch Minimierung des Residuenvektors r Mit Euklidischer Distanz Least Squares Problem genannt: min x Ax b 2 (2)
Das Least Squares Problem min x ( Ax b 2 ) (3) wird, angenommen x liegt im aufgespannten Raum der Basis Z k x = Z k y rank(z) = k mit k < rang(a) zum Problem min y ( AZ k y b 2 ) (4) Problem: Finde geeignete Basis Z k
Gegeben sei die SVD von A: A = UΣV T = Und damit die kleinste Norm Lösung: x = r i=1 r i=1 σ i u i v T i (5) u T i b σ i v i (6) Gesucht: Ein geeignete Basis Z k und die Lösung für x
Setze im : Z k = V k (7) x beschränkt auf den von den k rechten Singulärvektoren von A aufgespannten Raum Die ja nach den absteigenden Singulärwerten sortiert sind σ 1 σ 2... σ k (8)
Damit wird also Z k = V k in das Least Squares Problem eingesetzt: Ax b 2 2 AV k y b 2 2 UΣV T V k y b 2 2 ( ) Ik y b 2 2 UΣ U ( Σk 0 0 ) y b 2 2 (9a) (9b) (9c) (9d) (9e)
U U( ) y b 2 2 0 ) y U T b) 2 2 0 ) y U T b 2 2 ( Σk ( Σk ( Σk 0 ( Σk 0 ) ( U T y 1...k b Uk+1...r T b Σ k y U T 1...k b 2 2 + (10a) (10b) (10c) ) 2 2 (10d) r i=k+1 (u T i b) 2 (10e)
Somit gilt für y: Bzw. für x: Σ k y U T 1...k b 2 2 + r i=k+1 (u T i b) 2 (11) y = Σ 1 k UT k b (12) x k = V k Σ 1 k UT k b (13)
Beispiel 1.1 aus [Eld07, S. 4]. Dokumente d1: The Google matrix P is a model of the Internet. d2: P ij is nonzero if there is a link from Web page j to i. d3: The Google matrix is used to rank all Web pages. d4: The ranking is done by solving a matrix eigenvalue problem. d5: England dropped out of the top 10 in the FIFA ranking. Queries q1: ranking of Web pages q2: England in FIFA
Term d1 d2 d3 d4 d5 q1 q2 eigenvalue 0 0 0 1 0 0 0 England 0 0 0 0 1 0 1 FIFA 0 0 0 0 1 0 1 Google 1 0 1 0 0 0 0 Internet 1 0 0 0 0 0 0 link 0 1 0 0 0 0 0 matrix 1 0 1 1 0 0 0 page 0 1 1 0 0 1 0 rank 0 0 1 1 1 1 0 Web 0 1 1 0 0 1 0
Least Squares für b = q i : min y ( AV k y q i 2 ) (14) Relativer Fehler: AV k y q i 2 / q i 2 (15)
Wiederholung Householdertransformation Gegeben einen beliebigen Vektor v 0: Dann ist P eine symmetrische, orthogonale Matrix, wenn: P = I 2 v T v vv T (16) Gegeben zwei Vektoren x und y mit gleicher Länge, x 2 = y 2. Gesucht eine Householdertransformation die x nach y überführt: Px = y (17)
Setzt man v = x y: Px =y (I 2 v T v vv T )x =y x 2v T x v T v v =y (18a) (18b) (18c) v T v = x T x + y T x 2x T y = 2(x T x x T y) (19)
Da x T x = y T y gilt: Und somit: v T x = x T x y T x = v T v 2 (20) Px = x 2 v T x v T v v = x v = y (21)
mit Householdertransformationen Gegeben: C R mxn m n Gesucht obere Bidiagonalisierung ˆB: C = P Wobei P und W orthogonal sind. ) (ˆB W T (22) 0
Verfahren mit Householdertransformationen Householdertransformationen Pi T, W i abwechselnd auf C auf die Spalten P T i W i auf die Zeilen P und W sind dann die Produkte: P = P 1 P 2 P 3... P n R mxm W = W 1 W 2 W 3... W n 2 R nxn ˆB ist das so transformierte C
Beispiel mit C R 6x5 P T 1 C = P T 1 x x x x x x x x x x 0 x x x x x x x x x x = 0 0 x x x x x 0 x x x x x 0 Wobei P T 1 eine Householdertransformation ist.
0 0 0 0 0 P1 T CW 1 = 0 0 W 1 = 0 0 = C 1 0 0 0 0 ( ) 1 0 Wobei W 1 = und Z 0 Z 1 eine Householdertransformation ist. 1
0 0 0 0 0 0 P2 T C 1 W 2 = 0 0 0 0 = C 2 0 0 0 0
0 0 0 0 0 0 P T CW = 0 0 0 0 0 0 = 0 0 0 0 0 0 0 0 0 ) (ˆB 0
Allgemein hat ˆB R nxn die Form: β 1 α 1 β 2 α 2 ˆB =...... β n 1 α n 1 β n Und W enthält die orthogonale Matrix Z R n 1xn 1 : ( ) 1 0 W = 0 Z
Zum lösen des Least Squares Problem: Setzen wir C = ( b A ) : min x b Ax 2 P T CW = P T ( b A ) W
P T CW = P T ( b A ) ( ) 1 0 0 Z (23a) = ( P T b P T AZ ) (23b) ( ) β1 e = 1 B (23c) 0 0 wobei B: α 1 β 2 α 2 B =...... β n 1 α n 1 β n
Wieder angenommen y = Z T x: b Ax 2 = ( b A ) ( ) 1 x 2 (24a) ) ( 1 = P T ( b A ) ( 1 0 0 Z = ( P T b P T AZ ) ( 1 y = β 1 e 1 By 2 bzw. als Least Squares Problem: ) 2 (24b) y ) 2 (24c) (24d) min y ( β 1 e 1 By 2 ) (25)
Approximation der Lösung: min y ( AZ k y b 2 ) (26) min y ( P k+1 Z k+1 y b 2 ) = min y ( B k+1 β 1 e 1 2 ) (27) wobei B k+1 : α 1 β 2 α 2 B k+1 =...... β k β 1 0 β 1 e 1 = 0 α k 0 β k+1 0
1. Ziehen sie das Beispiel für die truncated SVD anhand der Matrix aus dem letzten Vortrag Latent Semantic Indexing von Florian Frankenberger nach.
Lars Eldén. Matrix Methods in Data Mining and Pattern Recognition. Society for Industrial and Applied Mathematics, Philadelphia, PA, USA, 2007. Gene H. Golub and Charles F. van Loan. Matrix Computations. John Hopkins University Press, Baltimore and London, 3rd edition, 1996. Gilbert Strang. Lineare Algebra. Springer, 2003.