SlideShare a Scribd company logo
1 of 24
Matrix Factorization

       Lecture #7
        EEE 574
   Dr. Dan Tylavsky
© Copyright 1999 Daniel Tylavsky
     Matrix Factorization
Let’s look at solving Ax=b
    A, b are dense.
Two possible (general approaches):
– Indirect Methods - methods which asymptotically approach (but never reach) the true solution as the number of steps increases.
         Ex: Point Jacobi, Gauss-Siedel, Successive Over relaxation, Multigrid
–
     •
© Copyright 1999 Daniel Tylavsky
          Matrix Factorization
    Direct Methods - methods that yield the theoretically exact result in a fixed number of steps. (Assuming an infinitely precise computing engine.)
         Ex: Elimination Methods
            Gauss Elimination
            Gauss-Jordan Elimination
–           Cholesky Factorization (Numerically Symmetric)
     •
          – LU or LDU factorization (a.k.a., Product form of the Inverse),(Variations Include Crout, Doolittle, Banachiewicz)
          –
         Orthogonalization Methods
          –
            QR factorization
          –
            Given Rotations
     •
           –
           –
© Copyright 1999 Daniel Tylavsky
     Matrix Factorization
    Conjugate Gradient Methods - Exact solution in # of steps equal to the number of different eigenvalues.
        Various Variations

Advantages of Elimination Methods
  •
       –
  No convergence criteria (however, pivoting in general non-positive definite case.)
  Factors can be used repeatedly.
  Factors can be ‘easily’ modified to accommodate matrix/network changes.
–
  Partial factorized matrices give linear network equivalents.
–
–
–
© Copyright 1999 Daniel Tylavsky
Matrix Factorization
    Definitions
–      Symmetric: A=AT
     • Positive Definite: xTAx>0, (A>0 is short hand notation)
     • Diagonally Dominant:
     •




                                                                      aii ≥   ∑a
                                                                              j ≠i
                                                                                     ,with inequality for at least one i.
                                                                                      ij



                           • Properly Diagonally Dominant: aii >                               ∑a
                                                                                                j ≠i
                                                                                                       ij   for all i.
               • Rank: Order of the largest sub-matrix with nonzero determinant.
© Copyright 1999 Daniel Tylavsky
               Matrix Factorization
    Properties
–      Symmetric pos. def. (A>0) matrix has all positive real eigenvalues.
     • If A>0, then Det(A)=|A|>0.
     • A rank 1 matrix must have the outer-product form, xyT.
     •




                                        1                                            2 4 6 
                                    x =  2  , y T = [ 2 4 6]
                                                                              xy T = 4 8 12
                                                                                              
                                         3
                                                                                     6 12 18
                                                                                              
             • Symmetric A>0 has a unique Cholesky factorization. A=U U, A=U’ DU’
                                                                           T         T


             • If A is properly diagonally dominant and all of its diagonal elements are positive, then A is positive definite.
© Copyright 1999 Daniel Tylavsky
  Matrix Factorization
 – Factorizing a non-symmetric matrix.
     a11    a12    a13       a1n 
    a       a 22   a 23      a2n 
     21                             α bT 
A =  a31    a32    a33       a3 n  =  1 ~ 
                                            1
                                    c    A1 
                              1        
     a n1   an 2   a n3      ann 
                                   
  – I claim A can be expanded in the following form:
           α1 0 1       0 1  b1
                                   T     
         A=                         α1  = L1 A 2U 1
            c1 I  0
                         A2  0
                                   I  
© Copyright 1999 Daniel Tylavsky
Matrix Factorization
– To find the value of A2, multiply.
     α1 0 1           0 1  b1
                                 T     
   A=                             α1  = L1 A 2U 1
      c1 I  0
                       A2  0
                                 I  

                    b1
                      T      α1                 T
                                                 b1         
     α1      0 1                                            α1 b1 
                                                                   T
   A=                 α1  =                           =
                                                             c1 A1 
                                                    T
                                                c1b1             ~
      c1     A2  0   I   c1          A2 +                       
                                                      α1         
                                               Outer product term of
– Therefore:                                  first row & first column
              T          ~                  T
                                       ~ c1b1 (absent. diag. element)
           c1b1
  ∴ A2 +               = A1     ⇒ A2 = A1 −
                  α1                          α         1
© Copyright 1999 Daniel Tylavsky
    Matrix Factorization
– Do this repeatedly until we have the product form of A.


                                       1    0T 
                       1 0           
                                        T
                                                T
                             U 1 = L1 0 α 2 b2 U 1
             2
     A = L1 A U 1 = L1 
                       0 A2 
                                             ~
                                       
                                         c2 A2 


          1 0             0  1 0
                             T
                                                    0 T  1 0 0T  1 0  0T 
                           T=
                                                                               
                                                      T       T
                                                                          T
    A 2 = 0 α 2                                                         b2
                           b2  0 α 2              0  0 1 0  0 1        α2 
                           ~  
           0 c2
                          A2   0 c2               I  0 0 A3  0 0
                                                                        I 
                                                                                


                                   =             L2          A3               U2
© Copyright 1999 Daniel Tylavsky
 Matrix Factorization
– To find A3, multiply the result.
      1 0     0T   1 0 0T  1 0     0T 
                                   T
                                       b2     
A 2 = 0 α 2     T         T
               0  0 1 0  0 1                = L2 A3U 2
                                           α2 
       0 c2
               I  0 0 A3  0 0
                                      I 
                                              

     1 0 0T  1 0         0T  1 0                 0T      
                                                          
                 T
                           T
                          b2
                                  = 0 α 2
                                                       T
   = 0 α 2 0  0 1                                  b2      
                              α2 
      0 c2 A3  0 0
                  
                                     
                             I   0 c2 A3 + c2 b2
                                                         T    
                                                          α2 
                                                              
             T         ~            ~ c b    T
         c b
  ∴ A3 + 2 2        = A2   ⇒ A3 = A2 − 2 2
               α2                               α2
  – We can write:
     A = L1 L2 A3U 2U1
© Copyright 1999 Daniel Tylavsky
Matrix Factorization
– Continuing on yields:
 A = L1 L2  Ln −1 A nU n −1 U 2U 1

– where:
      1          
        0       
 An =            =L
                     n
        0 1      
              n 
            a nn 

– We can write:
 A = L1 L2  Ln −1 LnU n −1 U 2U1
Elementary-Matrix-Multiplication-Superposition Principal.


–



                                                                        © Copyright 1999 Daniel Tylavsky
                         Matrix Factorization
                                i j
                                      1
                                                                             i j
                                                                                             
                                           1                                              
                                                                                        
                                                                            1             ←i
                                              αi                                          
                                  Li L j =                                      αj         ← j ,i < j
                                                               1                     1    
                                              ci                                         
                                                                                cj      
                                           
                                                                   1 
                                                                     
                                                                                           1
                                                                                             
                                                                           1                 
                                                                                            
                                                                                             
                                                                              αi             ←i
                                                                                             
                                                                  Li L j =       αj           ← j ,i < j
                                                                                        1    
                                                                                             
                                                                              ci c j       
                                                                                            1
                                                                                             
© Copyright 1999 Daniel Tylavsky
                                Matrix Factorization
    This implies I can write:


–




                                                   α1                 
                                                       α2             
                                                                      
                                                          α3          
                                                                      
                                L1 L2  Ln −1 Ln =  c1               =L
                                                       c2            
                                                                      
                                                          c3         
                                                                   αn 
                                                                      
© Copyright 1999 Daniel Tylavsky
                             Matrix Factorization
    Taking the transpose of the elementary-matrix- multiplication-superposition principal allows me to write:


–




                                                                       T
                                                                       b1                                                                 
                                                                 1       α1                                                              
                                                                             T                                                           
                                                                  1         b2                                                           
                                                                               α2                                                        
                                                                                                                                   T
                                                                                                                                   b3     
                                         U n −1U n − 2 U 2U 1 =    1
                                                                                                                                      α3  = U
                                                                                                                                        
                                                                                                                                         
                                                                                                                                        
                                                                    1                                                                   
                                                                                                                                         
                                                                 
                                                                                                                                        1
                                                                                                                                          
    Hence we can write:


–
                                                                                                                A = LU
© Copyright 1999 Daniel Tylavsky
                           Matrix Factorization
    Let’s work though an example:


–




                                       10.000 -1.000 -2.000 -3.000
                                       -1.000 12.100 -2.200 -2.700
                                    A= -2.000 -2.200 15.880 -6.300
                                       -3.000 -2.700 -6.300 23.400
                       Divide Top Row by a11.
                  –

                                                               T
                                                          ~ c1b1        Divide 3rd Row by α3.
                               – Compute             A2 = A1 −
                                                                    –

                                                                    α1
                       Divide 2nd Row by α2.
                  –                                                                                           T
                                                                                                         ~ c3b3
                                                                T
                                                          ~ c2 b2
                                                                           – Compute                A4 = A3 −
                                                                                                                  α3
                               – Compute             A3 = A2 −
                                                                    α2
                       10.000                      0      0      0
                                                                 0
                                                 0.000 0.000 0.000     1.000
                                                                       1.000                    -0.100 -0.200 -0.300
                                                                                                 -0.100 -0.200 -0.300
                                                                                                -0.100 -0.200 -0.300
                       -1.000                   12.000 -2.400 -3.400
                                                          0      0
                                                12.100 -2.200 -2.700
                                                              -3.000     00                        1
                                                                                                   11     0      0
                                                                                                        -0.200 -0.250
                                                                                                        -0.200 -0.250
                                                                                                           0      0
                    A= -2.000                   -2.400 15.480 -6.900 *
                                                -2.200 15.880 -6.300 *
                                                       15.000 -7.500
                                                                 0       00                        0
                                                                                                   00     11
                                                                                                           1     0
                                                                                                               -0.500
                                                                                                               -0.500
                                                                                                                  0
                       -3.000                   -3.000 -6.900 22.500
                                                -2.700 -6.300 23.400
                                                       -7.500 21.750
                                                              18.000     00                        0
                                                                                                   00     00
                                                                                                           0     11
                                                                                                                  1
© Copyright 1999 Daniel Tylavsky
Matrix Factorization
Individual Problem: Verify that previous answer is correct.



   10.000          0          0         0           1.000     -0.100   -0.200   -0.300
   -1.000       12.000        0         0             0          1     -0.200   -0.250
A= -2.000       -2.400     15.000       0    *        0          0        1     -0.500
   -3.000       -3.000     -7.500     18.000          0          0        0        1

Individual Problem: Factor A=LU for:
         20.000 -20.000 -8.000 -8.000
         -20.000 40.000 3.000 3.000
      A= -8.000 3.000 14.450 -5.550
          -8.000 3.000 -5.550 24.450

Note that result isn’t symmetrical.
© Copyright 1999 Daniel Tylavsky
    Matrix Factorization
    To make this symmetric use the L’DL’T form.
    – Let
               l11                              – Write:
                   l 22                        
                                                  A = LD −1 DU = L' DL'T
            D=
                                   l33         
                                               
                                          l 44 
     10.000      0        0       0         1.000    -0.100        -0.200    -0.300
     -1.000   12.000      0       0           0         1          -0.200    -0.250
  A= -2.000   -2.400   15.000     0    *      0         0             1      -0.500
     -3.000   -3.000   -7.500   18.000        0         0             0         1

        1        0        0     0          10       0         0         0        1.000   -0.100   -0.200   -0.300
     -0.100      1        0     0          0        12        0         0          0        1     -0.200   -0.250
  A= -0.200   -0.200      1     0    *     0        0         15        0      * 0          0        1     -0.500
     -0.300   -0.250   -0.500   1          0        0         0         18         0        0        0        1

– Division by diag. of row & col. Performed @ same time.
© Copyright 1999 Daniel Tylavsky
Matrix Factorization
Individual Problem: Modify LU factors of A:

           20.000 -20.000 -8.000 -8.000
          -20.000 40.000 3.000 3.000
       A= -8.000 3.000 14.450 -5.550
           -8.000 3.000 -5.550 24.450

To get L’DL’T:
© Copyright 1999 Daniel Tylavsky
Matrix Factorization
Data structure for storing LU factors?

   10.000      0         0       0         1.000   -0.100   -0.200   -0.300
   -1.000   12.000       0       0           0        1     -0.200   -0.250
A= -2.000   -2.400    15.000     0    *      0        0        1     -0.500
   -3.000   -3.000    -7.500   18.000        0        0        0        1
 For LU factors could use LC-D-UR/X:

    Pos:     0        1    2     3   4    5    6               7       8      9   10   11   12
DiagL(k)             10.0 12 15 18
   U(k):             -0.1 -0.2 -0.3 -0.2 -0.3 -0.5
    L(k):            -1.0 -2.0 -3.0 -2.4 -3.0 -7.5
 Indx(k):             2    3     4   3    4    4
 ERP(k):     0        3    5     6
© Copyright 1999 Daniel Tylavsky
  Matrix Factorization
      1        0         0     0       10       0    0        0     1.000   -0.100   -0.200   -0.300
   -0.100      1         0     0       0       12    0        0       0        1     -0.200   -0.250
A= -0.200   -0.200       1     0   *   0        0   15        0   * 0          0        1     -0.500
   -0.300   -0.250    -0.500   1       0        0    0       18       0        0        0        1

For L’DL’T factors could use CR(L)-D/X:

    Pos:     0         1   2     3   4     5   6         7        8     9     10     11       12
 Diag(k)             10.0 12 15 18
    L(k):            -0.1 -0.2 -0.3 -0.2 -0.3 -0.5
RIndx(k):              2   3     4   3     4   4
 ERP(k):     0         3   5     6
© Copyright 1999 Daniel Tylavsky
                              Matrix Factorization
    If we store & work through A by rows, factorization is done in a slightly different way:


–




                                                                                                                          10.000    -1.000    -2.000    -3.000
                                                                                                                          -1.000    12.100    -2.200    -2.700
                                                                                                                       A= -2.000    -2.200    15.880    -6.300
                   –
                         Divide Top Row by a11.                                                                           -3.000    -2.700    -6.300    23.400
                                                                                                                  T
                                                                                                             ~ c1b1
                                  – Compute                                                             A2 = A1 −
                                                                                                                      α1 for   2nd row.
                         Divide 2nd Row by α2.
                   –
                                                                                                             T
                                                                                                        ~ c1b1                           T
                                                                                                                                   ~ c2 b2
                                  – Compute                                                        A2 = A1 −
                                                                                                                    α1and     A3 = A2 −        for
                                                                                                                                              α2       3rd row.
                         10.000                                                                   0         0         0         1    -0.100    -0.200    -0.300
                         -1.000                                                                12.000
                                                                                               12.100       0
                                                                                                         -2.400
                                                                                                         -2.200       0
                                                                                                                   -3.000
                                                                                                                   -2.700       0       1      -0.200
                                                                                                                                                  0      -0.250
                                                                                                                                                            0
                      A= -2.000                                                                -2.400
                                                                                               -2.200    15.000
                                                                                                         15.880    -7.500
                                                                                                                   -6.300 *     0       0         1         0
                         -3.000                                                                -2.700    -6.300    23.400       0       0         0         1
© Copyright 1999 Daniel Tylavsky
 Matrix Factorization
Individual Problem: Finish the factorization.

   10.000        0         0         0          1   -0.100   -0.200   -0.300
   -1.000     12.000       0         0          0      1     -0.200   -0.250
A= -2.000     -2.400    15.000    -7.500 *      0      0        1        0
   -3.000     -2.700    -6.300    23.400        0      0        0        1
© Copyright 1999 Daniel Tylavsky
 Matrix Factorization
 – Cholesky Factorization (Symmetric A=LLT.)
     a11   a12    a13         a1n 
    a      a 22   a 23        a2n 
     12                              α bT 
A =  a13   a 23   a33         a 3n  =  1 ~ 
                                             1
                                      b A1 
                               1       
    a1n    a2n    a3 n        a nn 
                                    
  – A can be expanded in the following form:
       α1         0 1                T
                                        b1       
                            0   α1
  A =  b1           
                                              α1  = L1 A L1
                                                         2 T
                                                               Etc.
                  I  0   A2                 
      
          α1        
                     
                                0
                                            I  
  – Not used. Calculating square-roots is expensive.
The End

More Related Content

What's hot

Lesson 14: Derivatives of Logarithmic and Exponential Functions
Lesson 14: Derivatives of Logarithmic and Exponential FunctionsLesson 14: Derivatives of Logarithmic and Exponential Functions
Lesson 14: Derivatives of Logarithmic and Exponential FunctionsMatthew Leingang
 
Lecture on solving1
Lecture on solving1Lecture on solving1
Lecture on solving1NBER
 
Exponentials integrals
Exponentials integralsExponentials integrals
Exponentials integralsTarun Gehlot
 
7.digital basicsa
7.digital basicsa7.digital basicsa
7.digital basicsaChethan Nt
 
Lesson 16: Inverse Trigonometric Functions
Lesson 16: Inverse Trigonometric FunctionsLesson 16: Inverse Trigonometric Functions
Lesson 16: Inverse Trigonometric FunctionsMatthew Leingang
 
Solution of linear and nonlinear partial differential equations using mixture...
Solution of linear and nonlinear partial differential equations using mixture...Solution of linear and nonlinear partial differential equations using mixture...
Solution of linear and nonlinear partial differential equations using mixture...Alexander Decker
 
11.solution of linear and nonlinear partial differential equations using mixt...
11.solution of linear and nonlinear partial differential equations using mixt...11.solution of linear and nonlinear partial differential equations using mixt...
11.solution of linear and nonlinear partial differential equations using mixt...Alexander Decker
 
addmaths-gantt-chart-f4-and-5
addmaths-gantt-chart-f4-and-5addmaths-gantt-chart-f4-and-5
addmaths-gantt-chart-f4-and-5suefee
 
Statistics lecture 13 (chapter 13)
Statistics lecture 13 (chapter 13)Statistics lecture 13 (chapter 13)
Statistics lecture 13 (chapter 13)jillmitchell8778
 
Geometry Section 3-4 1112
Geometry Section 3-4 1112Geometry Section 3-4 1112
Geometry Section 3-4 1112Jimbo Lamb
 
Optimalpolicyhandout
OptimalpolicyhandoutOptimalpolicyhandout
OptimalpolicyhandoutNBER
 
Chapter 3 projection
Chapter 3 projectionChapter 3 projection
Chapter 3 projectionNBER
 
Doclad Ulm 2008
Doclad Ulm 2008Doclad Ulm 2008
Doclad Ulm 2008shmill
 

What's hot (20)

Models
ModelsModels
Models
 
Rouviere
RouviereRouviere
Rouviere
 
Lesson 14: Derivatives of Logarithmic and Exponential Functions
Lesson 14: Derivatives of Logarithmic and Exponential FunctionsLesson 14: Derivatives of Logarithmic and Exponential Functions
Lesson 14: Derivatives of Logarithmic and Exponential Functions
 
Lecture on solving1
Lecture on solving1Lecture on solving1
Lecture on solving1
 
Exponentials integrals
Exponentials integralsExponentials integrals
Exponentials integrals
 
7.digital basicsa
7.digital basicsa7.digital basicsa
7.digital basicsa
 
Chapter 1 straight line
Chapter 1 straight lineChapter 1 straight line
Chapter 1 straight line
 
Peta karnaugh
Peta karnaughPeta karnaugh
Peta karnaugh
 
Lesson 16: Inverse Trigonometric Functions
Lesson 16: Inverse Trigonometric FunctionsLesson 16: Inverse Trigonometric Functions
Lesson 16: Inverse Trigonometric Functions
 
Solution of linear and nonlinear partial differential equations using mixture...
Solution of linear and nonlinear partial differential equations using mixture...Solution of linear and nonlinear partial differential equations using mixture...
Solution of linear and nonlinear partial differential equations using mixture...
 
11.solution of linear and nonlinear partial differential equations using mixt...
11.solution of linear and nonlinear partial differential equations using mixt...11.solution of linear and nonlinear partial differential equations using mixt...
11.solution of linear and nonlinear partial differential equations using mixt...
 
addmaths-gantt-chart-f4-and-5
addmaths-gantt-chart-f4-and-5addmaths-gantt-chart-f4-and-5
addmaths-gantt-chart-f4-and-5
 
Statistics lecture 13 (chapter 13)
Statistics lecture 13 (chapter 13)Statistics lecture 13 (chapter 13)
Statistics lecture 13 (chapter 13)
 
Geometry Section 3-4 1112
Geometry Section 3-4 1112Geometry Section 3-4 1112
Geometry Section 3-4 1112
 
Iskmaa
IskmaaIskmaa
Iskmaa
 
Session 20
Session 20Session 20
Session 20
 
Linear (in)dependence
Linear (in)dependenceLinear (in)dependence
Linear (in)dependence
 
Optimalpolicyhandout
OptimalpolicyhandoutOptimalpolicyhandout
Optimalpolicyhandout
 
Chapter 3 projection
Chapter 3 projectionChapter 3 projection
Chapter 3 projection
 
Doclad Ulm 2008
Doclad Ulm 2008Doclad Ulm 2008
Doclad Ulm 2008
 

Viewers also liked

Intro to Factorization Machines
Intro to Factorization MachinesIntro to Factorization Machines
Intro to Factorization MachinesPavel Kalaidin
 
آموزش محاسبات عددی - بخش دوم
آموزش محاسبات عددی - بخش دومآموزش محاسبات عددی - بخش دوم
آموزش محاسبات عددی - بخش دومfaradars
 
Matrix Factorization Technique for Recommender Systems
Matrix Factorization Technique for Recommender SystemsMatrix Factorization Technique for Recommender Systems
Matrix Factorization Technique for Recommender SystemsAladejubelo Oluwashina
 
Neighbor methods vs matrix factorization - case studies of real-life recommen...
Neighbor methods vs matrix factorization - case studies of real-life recommen...Neighbor methods vs matrix factorization - case studies of real-life recommen...
Neighbor methods vs matrix factorization - case studies of real-life recommen...Domonkos Tikk
 
Nonnegative Matrix Factorization
Nonnegative Matrix FactorizationNonnegative Matrix Factorization
Nonnegative Matrix FactorizationTatsuya Yokota
 
Collaborative Filtering with Spark
Collaborative Filtering with SparkCollaborative Filtering with Spark
Collaborative Filtering with SparkChris Johnson
 
Lecture 6 lu factorization & determinants - section 2-5 2-7 3-1 and 3-2
Lecture 6   lu factorization & determinants - section 2-5 2-7 3-1 and 3-2Lecture 6   lu factorization & determinants - section 2-5 2-7 3-1 and 3-2
Lecture 6 lu factorization & determinants - section 2-5 2-7 3-1 and 3-2njit-ronbrown
 
Recommender system introduction
Recommender system   introductionRecommender system   introduction
Recommender system introductionLiang Xiang
 
Factorization Machines with libFM
Factorization Machines with libFMFactorization Machines with libFM
Factorization Machines with libFMLiangjie Hong
 
Introduction to Matrix Factorization Methods Collaborative Filtering
Introduction to Matrix Factorization Methods Collaborative FilteringIntroduction to Matrix Factorization Methods Collaborative Filtering
Introduction to Matrix Factorization Methods Collaborative FilteringDKALab
 
Beginners Guide to Non-Negative Matrix Factorization
Beginners Guide to Non-Negative Matrix FactorizationBeginners Guide to Non-Negative Matrix Factorization
Beginners Guide to Non-Negative Matrix FactorizationBenjamin Bengfort
 
Recommendation system
Recommendation system Recommendation system
Recommendation system Vikrant Arya
 
Recommender Systems
Recommender SystemsRecommender Systems
Recommender SystemsT212
 
Collaborative Filtering Recommendation System
Collaborative Filtering Recommendation SystemCollaborative Filtering Recommendation System
Collaborative Filtering Recommendation SystemMilind Gokhale
 
Building a Recommendation Engine - An example of a product recommendation engine
Building a Recommendation Engine - An example of a product recommendation engineBuilding a Recommendation Engine - An example of a product recommendation engine
Building a Recommendation Engine - An example of a product recommendation engineNYC Predictive Analytics
 
Recommender system algorithm and architecture
Recommender system algorithm and architectureRecommender system algorithm and architecture
Recommender system algorithm and architectureLiang Xiang
 

Viewers also liked (17)

Intro to Factorization Machines
Intro to Factorization MachinesIntro to Factorization Machines
Intro to Factorization Machines
 
آموزش محاسبات عددی - بخش دوم
آموزش محاسبات عددی - بخش دومآموزش محاسبات عددی - بخش دوم
آموزش محاسبات عددی - بخش دوم
 
Matrix Factorization Technique for Recommender Systems
Matrix Factorization Technique for Recommender SystemsMatrix Factorization Technique for Recommender Systems
Matrix Factorization Technique for Recommender Systems
 
Neighbor methods vs matrix factorization - case studies of real-life recommen...
Neighbor methods vs matrix factorization - case studies of real-life recommen...Neighbor methods vs matrix factorization - case studies of real-life recommen...
Neighbor methods vs matrix factorization - case studies of real-life recommen...
 
Nonnegative Matrix Factorization
Nonnegative Matrix FactorizationNonnegative Matrix Factorization
Nonnegative Matrix Factorization
 
Collaborative Filtering with Spark
Collaborative Filtering with SparkCollaborative Filtering with Spark
Collaborative Filtering with Spark
 
Lecture 6 lu factorization & determinants - section 2-5 2-7 3-1 and 3-2
Lecture 6   lu factorization & determinants - section 2-5 2-7 3-1 and 3-2Lecture 6   lu factorization & determinants - section 2-5 2-7 3-1 and 3-2
Lecture 6 lu factorization & determinants - section 2-5 2-7 3-1 and 3-2
 
Recommender system introduction
Recommender system   introductionRecommender system   introduction
Recommender system introduction
 
Factorization Machines with libFM
Factorization Machines with libFMFactorization Machines with libFM
Factorization Machines with libFM
 
Introduction to Matrix Factorization Methods Collaborative Filtering
Introduction to Matrix Factorization Methods Collaborative FilteringIntroduction to Matrix Factorization Methods Collaborative Filtering
Introduction to Matrix Factorization Methods Collaborative Filtering
 
Recommender Systems
Recommender SystemsRecommender Systems
Recommender Systems
 
Beginners Guide to Non-Negative Matrix Factorization
Beginners Guide to Non-Negative Matrix FactorizationBeginners Guide to Non-Negative Matrix Factorization
Beginners Guide to Non-Negative Matrix Factorization
 
Recommendation system
Recommendation system Recommendation system
Recommendation system
 
Recommender Systems
Recommender SystemsRecommender Systems
Recommender Systems
 
Collaborative Filtering Recommendation System
Collaborative Filtering Recommendation SystemCollaborative Filtering Recommendation System
Collaborative Filtering Recommendation System
 
Building a Recommendation Engine - An example of a product recommendation engine
Building a Recommendation Engine - An example of a product recommendation engineBuilding a Recommendation Engine - An example of a product recommendation engine
Building a Recommendation Engine - An example of a product recommendation engine
 
Recommender system algorithm and architecture
Recommender system algorithm and architectureRecommender system algorithm and architecture
Recommender system algorithm and architecture
 

Similar to Matrix factorization

งานนำเสนอMatrix
งานนำเสนอMatrixงานนำเสนอMatrix
งานนำเสนอMatrixkrunittayamath
 
งานนำเสนอMatrixของจริง
งานนำเสนอMatrixของจริงงานนำเสนอMatrixของจริง
งานนำเสนอMatrixของจริงNittaya Noinan
 
Fatigue damage in solder joint interconnects - presentation
Fatigue damage in solder joint interconnects - presentationFatigue damage in solder joint interconnects - presentation
Fatigue damage in solder joint interconnects - presentationDr. Adnan Judeh (Abdul-Baqi)
 
mechanic of machine-Mechanical Vibrations
mechanic of machine-Mechanical Vibrationsmechanic of machine-Mechanical Vibrations
mechanic of machine-Mechanical VibrationsYarwindran Mogan
 
Linear Transformations_part1.pdf
Linear Transformations_part1.pdfLinear Transformations_part1.pdf
Linear Transformations_part1.pdfHirunManujaya
 
Parameter Estimation in Stochastic Differential Equations by Continuous Optim...
Parameter Estimation in Stochastic Differential Equations by Continuous Optim...Parameter Estimation in Stochastic Differential Equations by Continuous Optim...
Parameter Estimation in Stochastic Differential Equations by Continuous Optim...SSA KPI
 
Chapter9 trignometry
Chapter9 trignometryChapter9 trignometry
Chapter9 trignometryRagulan Dev
 

Similar to Matrix factorization (9)

งานนำเสนอMatrix
งานนำเสนอMatrixงานนำเสนอMatrix
งานนำเสนอMatrix
 
งานนำเสนอMatrixของจริง
งานนำเสนอMatrixของจริงงานนำเสนอMatrixของจริง
งานนำเสนอMatrixของจริง
 
Fatigue damage in solder joint interconnects - presentation
Fatigue damage in solder joint interconnects - presentationFatigue damage in solder joint interconnects - presentation
Fatigue damage in solder joint interconnects - presentation
 
Mo u quantified
Mo u   quantifiedMo u   quantified
Mo u quantified
 
mechanic of machine-Mechanical Vibrations
mechanic of machine-Mechanical Vibrationsmechanic of machine-Mechanical Vibrations
mechanic of machine-Mechanical Vibrations
 
Session 2
Session 2Session 2
Session 2
 
Linear Transformations_part1.pdf
Linear Transformations_part1.pdfLinear Transformations_part1.pdf
Linear Transformations_part1.pdf
 
Parameter Estimation in Stochastic Differential Equations by Continuous Optim...
Parameter Estimation in Stochastic Differential Equations by Continuous Optim...Parameter Estimation in Stochastic Differential Equations by Continuous Optim...
Parameter Estimation in Stochastic Differential Equations by Continuous Optim...
 
Chapter9 trignometry
Chapter9 trignometryChapter9 trignometry
Chapter9 trignometry
 

Recently uploaded

Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and ModificationsMJDuyan
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.christianmathematics
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxRamakrishna Reddy Bijjam
 
Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...Association for Project Management
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsTechSoup
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...christianmathematics
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxDenish Jangid
 
PROCESS RECORDING FORMAT.docx
PROCESS      RECORDING        FORMAT.docxPROCESS      RECORDING        FORMAT.docx
PROCESS RECORDING FORMAT.docxPoojaSen20
 
Dyslexia AI Workshop for Slideshare.pptx
Dyslexia AI Workshop for Slideshare.pptxDyslexia AI Workshop for Slideshare.pptx
Dyslexia AI Workshop for Slideshare.pptxcallscotland1987
 
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptxSKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptxAmanpreet Kaur
 
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17  How to Extend Models Using Mixin ClassesMixin Classes in Odoo 17  How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17 How to Extend Models Using Mixin ClassesCeline George
 
Unit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxUnit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxVishalSingh1417
 
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...pradhanghanshyam7136
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17Celine George
 
Third Battle of Panipat detailed notes.pptx
Third Battle of Panipat detailed notes.pptxThird Battle of Panipat detailed notes.pptx
Third Battle of Panipat detailed notes.pptxAmita Gupta
 
Magic bus Group work1and 2 (Team 3).pptx
Magic bus Group work1and 2 (Team 3).pptxMagic bus Group work1and 2 (Team 3).pptx
Magic bus Group work1and 2 (Team 3).pptxdhanalakshmis0310
 
Spellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseSpellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseAnaAcapella
 
ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701bronxfugly43
 

Recently uploaded (20)

Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and Modifications
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docx
 
Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 
PROCESS RECORDING FORMAT.docx
PROCESS      RECORDING        FORMAT.docxPROCESS      RECORDING        FORMAT.docx
PROCESS RECORDING FORMAT.docx
 
Dyslexia AI Workshop for Slideshare.pptx
Dyslexia AI Workshop for Slideshare.pptxDyslexia AI Workshop for Slideshare.pptx
Dyslexia AI Workshop for Slideshare.pptx
 
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptxSKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
 
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17  How to Extend Models Using Mixin ClassesMixin Classes in Odoo 17  How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
 
Unit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxUnit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptx
 
Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024
 
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17
 
Spatium Project Simulation student brief
Spatium Project Simulation student briefSpatium Project Simulation student brief
Spatium Project Simulation student brief
 
Third Battle of Panipat detailed notes.pptx
Third Battle of Panipat detailed notes.pptxThird Battle of Panipat detailed notes.pptx
Third Battle of Panipat detailed notes.pptx
 
Magic bus Group work1and 2 (Team 3).pptx
Magic bus Group work1and 2 (Team 3).pptxMagic bus Group work1and 2 (Team 3).pptx
Magic bus Group work1and 2 (Team 3).pptx
 
Spellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseSpellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please Practise
 
ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701
 

Matrix factorization

  • 1. Matrix Factorization Lecture #7 EEE 574 Dr. Dan Tylavsky
  • 2. © Copyright 1999 Daniel Tylavsky Matrix Factorization Let’s look at solving Ax=b A, b are dense. Two possible (general approaches): – Indirect Methods - methods which asymptotically approach (but never reach) the true solution as the number of steps increases. Ex: Point Jacobi, Gauss-Siedel, Successive Over relaxation, Multigrid – •
  • 3. © Copyright 1999 Daniel Tylavsky Matrix Factorization Direct Methods - methods that yield the theoretically exact result in a fixed number of steps. (Assuming an infinitely precise computing engine.) Ex: Elimination Methods Gauss Elimination Gauss-Jordan Elimination – Cholesky Factorization (Numerically Symmetric) • – LU or LDU factorization (a.k.a., Product form of the Inverse),(Variations Include Crout, Doolittle, Banachiewicz) – Orthogonalization Methods – QR factorization – Given Rotations • – –
  • 4. © Copyright 1999 Daniel Tylavsky Matrix Factorization Conjugate Gradient Methods - Exact solution in # of steps equal to the number of different eigenvalues. Various Variations Advantages of Elimination Methods • – No convergence criteria (however, pivoting in general non-positive definite case.) Factors can be used repeatedly. Factors can be ‘easily’ modified to accommodate matrix/network changes. – Partial factorized matrices give linear network equivalents. – – –
  • 5. © Copyright 1999 Daniel Tylavsky Matrix Factorization Definitions – Symmetric: A=AT • Positive Definite: xTAx>0, (A>0 is short hand notation) • Diagonally Dominant: • aii ≥ ∑a j ≠i ,with inequality for at least one i. ij • Properly Diagonally Dominant: aii > ∑a j ≠i ij for all i. • Rank: Order of the largest sub-matrix with nonzero determinant.
  • 6. © Copyright 1999 Daniel Tylavsky Matrix Factorization Properties – Symmetric pos. def. (A>0) matrix has all positive real eigenvalues. • If A>0, then Det(A)=|A|>0. • A rank 1 matrix must have the outer-product form, xyT. • 1  2 4 6  x =  2  , y T = [ 2 4 6]   xy T = 4 8 12    3   6 12 18   • Symmetric A>0 has a unique Cholesky factorization. A=U U, A=U’ DU’ T T • If A is properly diagonally dominant and all of its diagonal elements are positive, then A is positive definite.
  • 7. © Copyright 1999 Daniel Tylavsky Matrix Factorization – Factorizing a non-symmetric matrix.  a11 a12 a13  a1n  a a 22 a 23  a2n   21  α bT  A =  a31 a32 a33  a3 n  =  1 ~  1   c A1          1   a n1 an 2 a n3  ann    – I claim A can be expanded in the following form: α1 0 1 0 1  b1 T  A=  α1  = L1 A 2U 1  c1 I  0  A2  0  I  
  • 8. © Copyright 1999 Daniel Tylavsky Matrix Factorization – To find the value of A2, multiply. α1 0 1 0 1  b1 T  A=  α1  = L1 A 2U 1  c1 I  0  A2  0  I    b1 T  α1 T b1   α1 0 1 α1 b1  T A=  α1  =  =   c1 A1  T  c1b1 ~  c1 A2  0 I   c1 A2 +    α1    Outer product term of – Therefore: first row & first column T ~ T ~ c1b1 (absent. diag. element) c1b1 ∴ A2 + = A1 ⇒ A2 = A1 − α1 α 1
  • 9. © Copyright 1999 Daniel Tylavsky Matrix Factorization – Do this repeatedly until we have the product form of A. 1 0T  1 0   T T U 1 = L1 0 α 2 b2 U 1 2 A = L1 A U 1 = L1  0 A2    ~   c2 A2  1 0 0  1 0 T 0 T  1 0 0T  1 0 0T   T=   T  T T A 2 = 0 α 2 b2 b2  0 α 2 0  0 1 0  0 1 α2  ~    0 c2  A2   0 c2 I  0 0 A3  0 0   I   = L2 A3 U2
  • 10. © Copyright 1999 Daniel Tylavsky Matrix Factorization – To find A3, multiply the result. 1 0 0T  1 0 0T  1 0 0T     T b2  A 2 = 0 α 2 T T 0  0 1 0  0 1 = L2 A3U 2 α2   0 c2  I  0 0 A3  0 0   I   1 0 0T  1 0 0T  1 0 0T       T T b2  = 0 α 2 T = 0 α 2 0  0 1 b2  α2   0 c2 A3  0 0    I   0 c2 A3 + c2 b2 T   α2   T ~ ~ c b T c b ∴ A3 + 2 2 = A2 ⇒ A3 = A2 − 2 2 α2 α2 – We can write: A = L1 L2 A3U 2U1
  • 11. © Copyright 1999 Daniel Tylavsky Matrix Factorization – Continuing on yields: A = L1 L2  Ln −1 A nU n −1 U 2U 1 – where: 1    0  An =  =L n  0 1   n   a nn  – We can write: A = L1 L2  Ln −1 LnU n −1 U 2U1
  • 12. Elementary-Matrix-Multiplication-Superposition Principal. – © Copyright 1999 Daniel Tylavsky Matrix Factorization i j 1 i j  1          1 ←i  αi   Li L j =   αj  ← j ,i < j  1  1   ci      cj     1    1  1        αi ←i   Li L j =  αj  ← j ,i < j  1     ci c j    1  
  • 13. © Copyright 1999 Daniel Tylavsky Matrix Factorization This implies I can write: – α1   α2     α3    L1 L2  Ln −1 Ln =  c1  =L  c2      c3    αn   
  • 14. © Copyright 1999 Daniel Tylavsky Matrix Factorization Taking the transpose of the elementary-matrix- multiplication-superposition principal allows me to write: –  T b1  1 α1   T   1 b2   α2   T b3  U n −1U n − 2 U 2U 1 =  1 α3  = U          1       1  Hence we can write: – A = LU
  • 15. © Copyright 1999 Daniel Tylavsky Matrix Factorization Let’s work though an example: – 10.000 -1.000 -2.000 -3.000 -1.000 12.100 -2.200 -2.700 A= -2.000 -2.200 15.880 -6.300 -3.000 -2.700 -6.300 23.400 Divide Top Row by a11. – T ~ c1b1 Divide 3rd Row by α3. – Compute A2 = A1 − – α1 Divide 2nd Row by α2. – T ~ c3b3 T ~ c2 b2 – Compute A4 = A3 − α3 – Compute A3 = A2 − α2 10.000 0 0 0 0 0.000 0.000 0.000 1.000 1.000 -0.100 -0.200 -0.300 -0.100 -0.200 -0.300 -0.100 -0.200 -0.300 -1.000 12.000 -2.400 -3.400 0 0 12.100 -2.200 -2.700 -3.000 00 1 11 0 0 -0.200 -0.250 -0.200 -0.250 0 0 A= -2.000 -2.400 15.480 -6.900 * -2.200 15.880 -6.300 * 15.000 -7.500 0 00 0 00 11 1 0 -0.500 -0.500 0 -3.000 -3.000 -6.900 22.500 -2.700 -6.300 23.400 -7.500 21.750 18.000 00 0 00 00 0 11 1
  • 16. © Copyright 1999 Daniel Tylavsky Matrix Factorization Individual Problem: Verify that previous answer is correct. 10.000 0 0 0 1.000 -0.100 -0.200 -0.300 -1.000 12.000 0 0 0 1 -0.200 -0.250 A= -2.000 -2.400 15.000 0 * 0 0 1 -0.500 -3.000 -3.000 -7.500 18.000 0 0 0 1 Individual Problem: Factor A=LU for: 20.000 -20.000 -8.000 -8.000 -20.000 40.000 3.000 3.000 A= -8.000 3.000 14.450 -5.550 -8.000 3.000 -5.550 24.450 Note that result isn’t symmetrical.
  • 17. © Copyright 1999 Daniel Tylavsky Matrix Factorization To make this symmetric use the L’DL’T form. – Let l11  – Write:  l 22    A = LD −1 DU = L' DL'T D=  l33     l 44  10.000 0 0 0 1.000 -0.100 -0.200 -0.300 -1.000 12.000 0 0 0 1 -0.200 -0.250 A= -2.000 -2.400 15.000 0 * 0 0 1 -0.500 -3.000 -3.000 -7.500 18.000 0 0 0 1 1 0 0 0 10 0 0 0 1.000 -0.100 -0.200 -0.300 -0.100 1 0 0 0 12 0 0 0 1 -0.200 -0.250 A= -0.200 -0.200 1 0 * 0 0 15 0 * 0 0 1 -0.500 -0.300 -0.250 -0.500 1 0 0 0 18 0 0 0 1 – Division by diag. of row & col. Performed @ same time.
  • 18. © Copyright 1999 Daniel Tylavsky Matrix Factorization Individual Problem: Modify LU factors of A: 20.000 -20.000 -8.000 -8.000 -20.000 40.000 3.000 3.000 A= -8.000 3.000 14.450 -5.550 -8.000 3.000 -5.550 24.450 To get L’DL’T:
  • 19. © Copyright 1999 Daniel Tylavsky Matrix Factorization Data structure for storing LU factors? 10.000 0 0 0 1.000 -0.100 -0.200 -0.300 -1.000 12.000 0 0 0 1 -0.200 -0.250 A= -2.000 -2.400 15.000 0 * 0 0 1 -0.500 -3.000 -3.000 -7.500 18.000 0 0 0 1 For LU factors could use LC-D-UR/X: Pos: 0 1 2 3 4 5 6 7 8 9 10 11 12 DiagL(k) 10.0 12 15 18 U(k): -0.1 -0.2 -0.3 -0.2 -0.3 -0.5 L(k): -1.0 -2.0 -3.0 -2.4 -3.0 -7.5 Indx(k): 2 3 4 3 4 4 ERP(k): 0 3 5 6
  • 20. © Copyright 1999 Daniel Tylavsky Matrix Factorization 1 0 0 0 10 0 0 0 1.000 -0.100 -0.200 -0.300 -0.100 1 0 0 0 12 0 0 0 1 -0.200 -0.250 A= -0.200 -0.200 1 0 * 0 0 15 0 * 0 0 1 -0.500 -0.300 -0.250 -0.500 1 0 0 0 18 0 0 0 1 For L’DL’T factors could use CR(L)-D/X: Pos: 0 1 2 3 4 5 6 7 8 9 10 11 12 Diag(k) 10.0 12 15 18 L(k): -0.1 -0.2 -0.3 -0.2 -0.3 -0.5 RIndx(k): 2 3 4 3 4 4 ERP(k): 0 3 5 6
  • 21. © Copyright 1999 Daniel Tylavsky Matrix Factorization If we store & work through A by rows, factorization is done in a slightly different way: – 10.000 -1.000 -2.000 -3.000 -1.000 12.100 -2.200 -2.700 A= -2.000 -2.200 15.880 -6.300 – Divide Top Row by a11. -3.000 -2.700 -6.300 23.400 T ~ c1b1 – Compute A2 = A1 − α1 for 2nd row. Divide 2nd Row by α2. – T ~ c1b1 T ~ c2 b2 – Compute A2 = A1 − α1and A3 = A2 − for α2 3rd row. 10.000 0 0 0 1 -0.100 -0.200 -0.300 -1.000 12.000 12.100 0 -2.400 -2.200 0 -3.000 -2.700 0 1 -0.200 0 -0.250 0 A= -2.000 -2.400 -2.200 15.000 15.880 -7.500 -6.300 * 0 0 1 0 -3.000 -2.700 -6.300 23.400 0 0 0 1
  • 22. © Copyright 1999 Daniel Tylavsky Matrix Factorization Individual Problem: Finish the factorization. 10.000 0 0 0 1 -0.100 -0.200 -0.300 -1.000 12.000 0 0 0 1 -0.200 -0.250 A= -2.000 -2.400 15.000 -7.500 * 0 0 1 0 -3.000 -2.700 -6.300 23.400 0 0 0 1
  • 23. © Copyright 1999 Daniel Tylavsky Matrix Factorization – Cholesky Factorization (Symmetric A=LLT.)  a11 a12 a13  a1n  a a 22 a 23  a2n   12  α bT  A =  a13 a 23 a33  a 3n  =  1 ~  1    b A1          1  a1n a2n a3 n  a nn    – A can be expanded in the following form:  α1 0 1  T b1  0   α1 A =  b1  α1  = L1 A L1 2 T Etc.  I  0 A2      α1    0  I   – Not used. Calculating square-roots is expensive.