Singular Value Decomposition

Slides:



Advertisements
Similar presentations
Eigen Decomposition and Singular Value Decomposition
Advertisements

Eigen Decomposition and Singular Value Decomposition
3D Geometry for Computer Graphics
Chapter 28 – Part II Matrix Operations. Gaussian elimination Gaussian elimination LU factorization LU factorization Gaussian elimination with partial.
Principal Component Analysis Based on L1-Norm Maximization Nojun Kwak IEEE Transactions on Pattern Analysis and Machine Intelligence, 2008.
PCA + SVD.
1cs542g-term High Dimensional Data  So far we’ve considered scalar data values f i (or interpolated/approximated each component of vector values.
Principal Component Analysis CMPUT 466/551 Nilanjan Ray.
Principal Component Analysis
Dan Witzner Hansen  Groups?  Improvements – what is missing?
Chapter 5 Orthogonality
Computer Graphics Recitation 5.
3D Geometry for Computer Graphics
Some useful linear algebra. Linearly independent vectors span(V): span of vector space V is all linear combinations of vectors v i, i.e.
Math for CSLecture 41 Linear Least Squares Problem Over-determined systems Minimization problem: Least squares norm Normal Equations Singular Value Decomposition.
Singular Value Decomposition COS 323. Underconstrained Least Squares What if you have fewer data points than parameters in your function?What if you have.
Face Recognition using PCA (Eigenfaces) and LDA (Fisherfaces)
SVD and PCA COS 323. Dimensionality Reduction Map points in high-dimensional space to lower number of dimensionsMap points in high-dimensional space to.
The Terms that You Have to Know! Basis, Linear independent, Orthogonal Column space, Row space, Rank Linear combination Linear transformation Inner product.
Chapter 2 Matrices Definition of a matrix.
Clustering In Large Graphs And Matrices Petros Drineas, Alan Frieze, Ravi Kannan, Santosh Vempala, V. Vinay Presented by Eric Anderson.
Structure from Motion (With a digression on SVD).
3D Geometry for Computer Graphics
3D Geometry for Computer Graphics
Lecture 20 SVD and Its Applications Shang-Hua Teng.
Boot Camp in Linear Algebra Joel Barajas Karla L Caballero University of California Silicon Valley Center October 8th, 2008.
1cs542g-term Notes  Extra class next week (Oct 12, not this Friday)  To submit your assignment: me the URL of a page containing (links to)
Matrices CS485/685 Computer Vision Dr. George Bebis.
Introduction The central problems of Linear Algebra are to study the properties of matrices and to investigate the solutions of systems of linear equations.
SVD(Singular Value Decomposition) and Its Applications
Summarized by Soo-Jin Kim
CSE554AlignmentSlide 1 CSE 554 Lecture 8: Alignment Fall 2014.
BMI II SS06 – Class 3 “Linear Algebra” Slide 1 Biomedical Imaging II Class 3 – Mathematical Preliminaries: Elementary Linear Algebra 2/13/06.
CSE554AlignmentSlide 1 CSE 554 Lecture 5: Alignment Fall 2011.
D. van Alphen1 ECE 455 – Lecture 12 Orthogonal Matrices Singular Value Decomposition (SVD) SVD for Image Compression Recall: If vectors a and b have the.
AN ORTHOGONAL PROJECTION
SVD: Singular Value Decomposition
Scientific Computing Singular Value Decomposition SVD.
MATH 685/ CSI 700/ OR 682 Lecture Notes Lecture 4. Least squares.
CSE554AlignmentSlide 1 CSE 554 Lecture 8: Alignment Fall 2013.
CSE 185 Introduction to Computer Vision Face Recognition.
E IGEN & S INGULAR V ALUE D ECOMPOSITION قسمتی از درس ریاضی مهندسی پیشرفته ( ارشد و دکتری ) دوشنبه، 3/9/90 1 دکتر رنجبر نوعی، گروه مهندسی کنترل.
CSE 446 Dimensionality Reduction and PCA Winter 2012 Slides adapted from Carlos Guestrin & Luke Zettlemoyer.
Review of Linear Algebra Optimization 1/16/08 Recitation Joseph Bradley.
EIGENSYSTEMS, SVD, PCA Big Data Seminar, Dedi Gadot, December 14 th, 2014.
Recognition, SVD, and PCA. Recognition Suppose you want to find a face in an imageSuppose you want to find a face in an image One possibility: look for.
Advanced Computer Graphics Spring 2014 K. H. Ko School of Mechatronics Gwangju Institute of Science and Technology.
Instructor: Mircea Nicolescu Lecture 8 CS 485 / 685 Computer Vision.
2.5 – Determinants and Multiplicative Inverses of Matrices.
Singular Value Decomposition and Numerical Rank. The SVD was established for real square matrices in the 1870’s by Beltrami & Jordan for complex square.
Boot Camp in Linear Algebra TIM 209 Prof. Ram Akella.
CSE 554 Lecture 8: Alignment
Eigenfaces (for Face Recognition)
Introduction The central problems of Linear Algebra are to study the properties of matrices and to investigate the solutions of systems of linear equations.
Introduction The central problems of Linear Algebra are to study the properties of matrices and to investigate the solutions of systems of linear equations.
Review of Linear Algebra
Eigen & Singular Value Decomposition
CS479/679 Pattern Recognition Dr. George Bebis
Lecture 8:Eigenfaces and Shared Features
Lecture: Face Recognition and Feature Reduction
Some useful linear algebra
SVD: Physical Interpretation and Applications
Principal Component Analysis
Recitation: SVD and dimensionality reduction
Singular Value Decomposition SVD
Outline Singular Value Decomposition Example of PCA: Eigenfaces.
Feature space tansformation methods
Lecture 13: Singular Value Decomposition (SVD)
The Elements of Linear Algebra
Lecture 20 SVD and Its Applications
Presentation transcript:

Singular Value Decomposition

Underconstrained Least Squares What if you have fewer data points than parameters in your function? Intuitively, can’t do standard least squares Recall that solution takes the form ATAx = ATb When A has more columns than rows, ATA is singular: can’t take its inverse, etc.

Underconstrained Least Squares More subtle version: more data points than unknowns, but data poorly constrains function Example: fitting to y=ax2+bx+c

Underconstrained Least Squares Problem: if problem very close to singular, roundoff error can have a huge effect Even on “well-determined” values! Can detect this: Uncertainty proportional to covariance C = (ATA)-1 In other words, unstable if ATA has small values More precisely, care if xT(ATA)x is small for any x Idea: if part of solution unstable, set answer to 0 Avoid corrupting good parts of answer

Singular Value Decomposition (SVD) Handy mathematical technique that has application to many problems Given any mn matrix A, algorithm to find matrices U, V, and W such that A = U W VT U is mn and orthonormal W is nn and diagonal V is nn and orthonormal

SVD Treat as black box: code widely available In Matlab: [U,W,V]=svd(A,0)

SVD The wi are called the singular values of A If A is singular, some of the wi will be 0 In general rank(A) = number of nonzero wi SVD is mostly unique (up to permutation of singular values, or if some wi are equal)

SVD and Inverses Why is SVD so useful? Application #1: inverses A-1=(VT)-1 W-1 U-1 = V W-1 UT Using fact that inverse = transpose for orthogonal matrices Since W is diagonal, W-1 also diagonal with reciprocals of entries of W

SVD and Inverses A-1=(VT)-1 W-1 U-1 = V W-1 UT This fails when some wi are 0 It’s supposed to fail – singular matrix Pseudoinverse: if wi=0, set 1/wi to 0 (!) “Closest” matrix to inverse Defined for all (even non-square, singular, etc.) matrices Equal to (ATA)-1AT if ATA invertible

SVD and Least Squares Solving Ax=b by least squares x=pseudoinverse(A) times b Compute pseudoinverse using SVD Lets you see if data is singular Even if not singular, ratio of max to min singular values (condition number) tells you how stable the solution will be Set 1/wi to 0 if wi is small (even if not exactly 0)

SVD and Eigenvectors Let A=UWVT, and let xi be ith column of V Consider ATA xi: So elements of W are sqrt(eigenvalues) and columns of V are eigenvectors of ATA What we wanted for robust least squares fitting!

SVD and Matrix Similarity One common definition for the norm of a matrix is the Frobenius norm: Frobenius norm can be computed from SVD So changes to a matrix can be evaluated by looking at changes to singular values

SVD and Matrix Similarity Suppose you want to find best rank-k approximation to A Answer: set all but the largest k singular values to zero Can form compact representation by eliminating columns of U and V corresponding to zeroed wi

SVD and PCA Principal Components Analysis (PCA): approximating a high-dimensional data set with a lower-dimensional subspace * Data points Second principal component First principal component Original axes

SVD and PCA Data matrix with points as rows, take SVD Subtract out mean (“whitening”) Columns of Vk are principal components Value of wi gives importance of each component

PCA on Faces: “Eigenfaces” First principal component Average face Other components For all except average, “gray” = 0, “white” > 0, “black” < 0

Using PCA for Recognition Store each person as coefficients of projection onto first few principal components Compute projections of target image, compare to database (“nearest neighbor classifier”)

Total Least Squares One final least squares application Fitting a line: vertical vs. perpendicular error

Total Least Squares Distance from point to line: where n is normal vector to line, a is a constant Minimize:

Total Least Squares First, let’s pretend we know n, solve for a Then

Total Least Squares So, let’s define and minimize

Total Least Squares Write as linear system Have An=0 Problem: lots of n are solutions, including n=0 Standard least squares will, in fact, return n=0

Constrained Optimization Solution: constrain n to be unit length So, try to minimize |An|2 subject to |n|2=1 Expand in eigenvectors ei of ATA: where the i are eigenvalues of ATA

Constrained Optimization To minimize subject to set min = 1, all other i = 0 That is, n is eigenvector of ATA with the smallest corresponding eigenvalue