34.1. Singular value decomposition (SVD) and Principal value analysis (PCA)#
PCA belongs to a general class of methods that perform dimensionality reduction on data, where data is defined broadly. This can be thought of as reducing redundancy in characterizing the data. In the context of reduced basis emulators, the “proper orthogonal decomposition” or POD approach is closely analogous to PCA. SVD is a key tool in both PCA and POD methods.
A good reference for SVD is A Singularly Valuable Decomposition: The SVD of a Matrix.
Some parts of this section were adapted from Computational-statistics-with-Python.ipynb, which is from a course taught at Duke University.
As a warm-up: a reminder and a checkpoint question.
Reminder of linear algebra using the index form
Recall that
where \(i,i'\) run from \(1\) to \(N\) and \(j,j'\) run from one to \(p\), where the highest power term is \(x^{p-1}\).
Summed over \(i,i',j,j'\) because they each appear (exactly) twice.
\((\Sigma^{-1})_{ii'} \neq (\Sigma_{i,i'})^{-1}\)
Be sure you understand the indices on the leftmost term, remembering that the matrix expression has this term transposed.
We know \(\chi^2\) is a scalar because there are no free indices.
Checkpoint Question
Prove that the Maximum Likelihood Estimate (MLE) for \(\chi^2\) defined by
is
Here \(\thetavec\) is a \(m\times 1\) matrix of parameters (i.e., there are \(m\) parameters), \(\Sigmamat\) is the \(m\times m\) covariance matrix, \(\Yvec\) is a \(N\times 1\) matrix of observations (data), and \(\Amat\) is an \(N\times m\) matrix
where \(N\) is the number of observations. The idea is to do this with explicit indices for vectors and matrices, using the Einstein summation convention.
Hint
A suggested approach:
Write \(\chi^2\) in indices: \(\chi^2 = (Y_i - A_{ij}\theta_j)\Sigma^{-1}_{ii'}(Y_{i'}- A_{i'j'}\theta_{j'})\), where summations over repeated indices are implied (be careful of transposes and using enough independent indices). How do we see that \(\chi^2\) is a scalar?
Find \(\partial\chi^2/\partial \theta_k = 0\) for all \(k\), using \(\partial\theta_j/\partial\theta_k = \delta_{jk}\). Isolate the terms with one component of \(\thetavec\) from those with none.
You should get the matrix equation \( (\AmatT \Sigmamat^{-1} \Yvec) = (\AmatT \Sigmamat^{-1} \Amat)\thetavec\). At this point you can directly solve for \(\thetavec\). Why can you do this now?
Answer
We find the MLE from \(\partial\chi^2/\partial\thetavec_k = 0\) for \(k = 1,\ldots p\).
Isolate the \(\thetavec\) terms on one side and show the doubled terms are equal:
In the second term on the left, switch \(i\leftrightarrow i'\) and use \((\Sigmavec^{-1})_{i',i} = (\Sigmavec^{-1})_{i,i'}\) because it is symmetric. This is then the same as the first term.
In the first term on the right, we switch \(j\leftrightarrow j'\) and use the symmetry of \(\Sigmavec\) again to show the two terms are the same.
Writing \(A_{ik} = (A^\intercal)_{ki}\), we get
or, removing the indices,
and then inverting (which is possible because the expression in parentheses on the right is a square, invertible matrix), we finally obtain:
Q.E.D.