Previous | Next --- Slide 56 of 86
Back to Lecture Thumbnails
adlibs

How exactly do we compute SVD? And how do we identify the singular vector of the smallest singular value?

motoole2

Assignment 2 discusses how to perform SVDs in practice; refer to the handout for details. In short though, we can make use of the following function: numpy.linalg.svd, which takes a matrix as input and output a matrix $\mathbf{U}$, a vector $\mathbf{S}$, and a matrix $\mathbf{Vh}$. The columns of matrix $\mathbf{U}$ represent the left singular vectors, the rows of matrix $\mathbf{Vh}$ represent the right singular vectors, and the elements of vector $\mathbf{S}$ represent the singular values. By convention, the singular values are ordered such that $S_{i} \geq S_{i+1}$.