CMU SCS 15-826: Multimedia Databases and Data Mining Lecture #18: SVD - part I (definitions) C. Faloutsos.

Slides:



Advertisements
Similar presentations
CMU SCS : Multimedia Databases and Data Mining Lecture #17: Text - part IV (LSI) C. Faloutsos.
Advertisements

Eigen Decomposition and Singular Value Decomposition
CMU SCS : Multimedia Databases and Data Mining Lecture #7: Spatial Access Methods - IV Grid files, dim. curse C. Faloutsos.
Eigen Decomposition and Singular Value Decomposition
Dimensionality Reduction. High-dimensional == many features Find concepts/topics/genres: – Documents: Features: Thousands of words, millions of word pairs.
CMU SCS : Multimedia Databases and Data Mining Lecture #19: SVD - part II (case studies) C. Faloutsos.
Chapter 28 – Part II Matrix Operations. Gaussian elimination Gaussian elimination LU factorization LU factorization Gaussian elimination with partial.
CMU SCS : Multimedia Databases and Data Mining Lecture #11: Fractals: M-trees and dim. curse (case studies – Part II) C. Faloutsos.
Covariance Matrix Applications
CMU SCS : Multimedia Databases and Data Mining Lecture#5: Multi-key and Spatial Access Methods - II C. Faloutsos.
Dimensionality Reduction PCA -- SVD
15-826: Multimedia Databases and Data Mining
CMU SCS : Multimedia Databases and Data Mining Lecture #16: Text - part III: Vector space model and clustering C. Faloutsos.
CMU SCS : Multimedia Databases and Data Mining Lecture #11: Fractals - case studies Part III (regions, quadtrees, knn queries) C. Faloutsos.
Lecture 19 Singular Value Decomposition
1cs542g-term High Dimensional Data  So far we’ve considered scalar data values f i (or interpolated/approximated each component of vector values.
10-603/15-826A: Multimedia Databases and Data Mining SVD - part II (more case studies) C. Faloutsos.
Text Databases. Outline Spatial Databases Temporal Databases Spatio-temporal Databases Data Mining Multimedia Databases Text databases Image and video.
Information Retrieval in Text Part III Reference: Michael W. Berry and Murray Browne. Understanding Search Engines: Mathematical Modeling and Text Retrieval.
Singular Value Decomposition (SVD) (see Appendix A.6, Trucco & Verri) CS485/685 Computer Vision Prof. George Bebis.
Multimedia Databases SVD II. SVD - Detailed outline Motivation Definition - properties Interpretation Complexity Case studies SVD properties More case.
TFIDF-space  An obvious way to combine TF-IDF: the coordinate of document in axis is given by  General form of consists of three parts: Local weight.
Singular Value Decomposition
1/ 30. Problems for classical IR models Introduction & Background(LSI,SVD,..etc) Example Standard query method Analysis standard query method Seeking.
The Terms that You Have to Know! Basis, Linear independent, Orthogonal Column space, Row space, Rank Linear combination Linear transformation Inner product.
1 Neural Nets Applications Vectors and Matrices. 2/27 Outline 1. Definition of Vectors 2. Operations on Vectors 3. Linear Dependence of Vectors 4. Definition.
10-603/15-826A: Multimedia Databases and Data Mining SVD - part I (definitions) C. Faloutsos.
3D Geometry for Computer Graphics
Lecture 20 SVD and Its Applications Shang-Hua Teng.
Ordinary least squares regression (OLS)
Multimedia Databases LSI and SVD. Text - Detailed outline text problem full text scanning inversion signature files clustering information filtering and.
Singular Value Decomposition and Data Management
E.G.M. PetrakisDimensionality Reduction1  Given N vectors in n dims, find the k most important axes to project them  k is user defined (k < n)  Applications:
DATA MINING LECTURE 7 Dimensionality Reduction PCA – SVD
Multimedia Indexing and Dimensionality Reduction.
Linear Algebra Review By Tim K. Marks UCSD Borrows heavily from: Jana Kosecka Virginia de Sa (UCSD) Cogsci 108F Linear.
SVD(Singular Value Decomposition) and Its Applications
Machine Learning CS 165B Spring Course outline Introduction (Ch. 1) Concept learning (Ch. 2) Decision trees (Ch. 3) Ensemble learning Neural Networks.
Linear Algebra Review 1 CS479/679 Pattern Recognition Dr. George Bebis.
CS246 Topic-Based Models. Motivation  Q: For query “car”, will a document with the word “automobile” be returned as a result under the TF-IDF vector.
Next. A Big Thanks Again Prof. Jason Bohland Quantitative Neuroscience Laboratory Boston University.
CMU SCS Graph Analytics wkshpC. Faloutsos (CMU) 1 Graph Analytics Workshop: Tools Christos Faloutsos CMU.
Digital Image Processing, 3rd ed. © 1992–2008 R. C. Gonzalez & R. E. Woods Gonzalez & Woods Matrices and Vectors Objective.
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.
2010 © University of Michigan Latent Semantic Indexing SI650: Information Retrieval Winter 2010 School of Information University of Michigan 1.
Carnegie Mellon Powerful Tools for Data Mining Fractals, power laws, SVD C. Faloutsos Carnegie Mellon University.
Dimensionality Reduction Shannon Quinn (with thanks to William Cohen of Carnegie Mellon University, and J. Leskovec, A. Rajaraman, and J. Ullman of Stanford.
CpSc 881: Information Retrieval. 2 Recall: Term-document matrix This matrix is the basis for computing the similarity between documents and queries. Today:
CMU SCS : Multimedia Databases and Data Mining Lecture #12: Fractals - case studies Part III (quadtrees, knn queries) C. Faloutsos.
Latent Semantic Indexing: A probabilistic Analysis Christos Papadimitriou Prabhakar Raghavan, Hisao Tamaki, Santosh Vempala.
CMU SCS KDD '09Faloutsos, Miller, Tsourakakis P5-1 Large Graph Mining: Power Tools and a Practitioner’s guide Task 5: Graphs over time & tensors Faloutsos,
CpSc 881: Machine Learning PCA and MDS. 2 Copy Right Notice Most slides in this presentation are adopted from slides of text book and various sources.
Introduction to Linear Algebra Mark Goldman Emily Mackevicius.
EIGENSYSTEMS, SVD, PCA Big Data Seminar, Dedi Gadot, December 14 th, 2014.
Dimensionality Reduction
Fall 1999 Copyright © R. H. Taylor Given a linear systemAx -b = e, Linear Least Squares (sometimes written Ax  b) We want to minimize the sum.
Instructor: Mircea Nicolescu Lecture 8 CS 485 / 685 Computer Vision.
Matrix Factorization & Singular Value Decomposition Bamshad Mobasher DePaul University Bamshad Mobasher DePaul University.
Algebraic Techniques for Analysis of Large Discrete-Valued Datasets 
Jeffrey D. Ullman Stanford University.  Often, our data can be represented by an m-by-n matrix.  And this matrix can be closely approximated by the.
1 Objective To provide background material in support of topics in Digital Image Processing that are based on matrices and/or vectors. Review Matrices.
CS246 Linear Algebra Review. A Brief Review of Linear Algebra Vector and a list of numbers Addition Scalar multiplication Dot product Dot product as a.
CS479/679 Pattern Recognition Dr. George Bebis
Lecture: Face Recognition and Feature Reduction
LSI, SVD and Data Management
Part 2: Graph Mining Tools - SVD and ranking
15-826: Multimedia Databases and Data Mining
15-826: Multimedia Databases and Data Mining
Recitation: SVD and dimensionality reduction
Next Generation Data Mining Tools: SVD and Fractals
Presentation transcript:

CMU SCS : Multimedia Databases and Data Mining Lecture #18: SVD - part I (definitions) C. Faloutsos

CMU SCS Copyright: C. Faloutsos (2014)2 Must-read Material Numerical Recipes in C ch. 2.6;Numerical Recipes in C MM Textbook Appendix DMM Textbook

CMU SCS Copyright: C. Faloutsos (2014)3 Outline Goal: ‘Find similar / interesting things’ Intro to DB Indexing - similarity search Data Mining

CMU SCS Copyright: C. Faloutsos (2014)4 Indexing - Detailed outline primary key indexing secondary key / multi-key indexing spatial access methods fractals text Singular Value Decomposition (SVD) multimedia...

CMU SCS Copyright: C. Faloutsos (2014)5 SVD - Detailed outline Motivation Definition - properties Interpretation Complexity Case studies Additional properties

CMU SCS Copyright: C. Faloutsos (2014)6 SVD - Motivation problem #1: text - LSI: find ‘concepts’ problem #2: compression / dim. reduction

CMU SCS Copyright: C. Faloutsos (2014)7 SVD - Motivation problem #1: text - LSI: find ‘concepts’

CMU SCS Copyright: C. Faloutsos (2014)P1-8 SVD - Motivation Customer-product, for recommendation system: bread lettuce beef vegetarians meat eaters tomatos chicken

CMU SCS Copyright: C. Faloutsos (2014)9 SVD - Motivation problem #2: compress / reduce dimensionality

CMU SCS Copyright: C. Faloutsos (2014)10 Problem - specs ~10**6 rows; ~10**3 columns; no updates; random access to any cell(s) ; small error: OK

CMU SCS Copyright: C. Faloutsos (2014)11 SVD - Motivation

CMU SCS Copyright: C. Faloutsos (2014)12 SVD - Motivation

CMU SCS Copyright: C. Faloutsos (2014)13 SVD - Detailed outline Motivation Definition - properties Interpretation Complexity Case studies Additional properties

CMU SCS Copyright: C. Faloutsos (2014)14 SVD - Definition (reminder: matrix multiplication x 3 x 22 x 1 =

CMU SCS Copyright: C. Faloutsos (2014)15 SVD - Definition (reminder: matrix multiplication x 3 x 22 x 1 = 3 x 1

CMU SCS Copyright: C. Faloutsos (2014)16 SVD - Definition (reminder: matrix multiplication x 3 x 22 x 1 = 3 x 1

CMU SCS Copyright: C. Faloutsos (2014)17 SVD - Definition (reminder: matrix multiplication x 3 x 22 x 1 = 3 x 1

CMU SCS Copyright: C. Faloutsos (2014)18 SVD - Definition (reminder: matrix multiplication x=

CMU SCS Copyright: C. Faloutsos (2014)19 SVD - Definition A = U  V T - example:

CMU SCS Copyright: C. Faloutsos (2014)20 SVD - Definition A [n x m] = U [n x r]   r x r] (V [m x r] ) T A: n x m matrix (eg., n documents, m terms) U: n x r matrix (n documents, r concepts)  : r x r diagonal matrix (strength of each ‘concept’) (r : rank of the matrix) V: m x r matrix (m terms, r concepts)

CMU SCS Copyright: C. Faloutsos (2014)21 SVD - Properties THEOREM [Press+92]: always possible to decompose matrix A into A = U  V T, where U,  V: unique (*) U, V: column orthonormal (ie., columns are unit vectors, orthogonal to each other) –U T U = I; V T V = I (I: identity matrix)  : singular are positive, and sorted in decreasing order

CMU SCS Copyright: C. Faloutsos (2014)22 SVD - Example A = U  V T - example: data inf. retrieval brain lung = CS MD xx

CMU SCS Copyright: C. Faloutsos (2014)23 SVD - Example A = U  V T - example: data inf. retrieval brain lung = CS MD xx CS-concept MD-concept

CMU SCS Copyright: C. Faloutsos (2014)24 SVD - Example A = U  V T - example: data inf. retrieval brain lung = CS MD xx CS-concept MD-concept doc-to-concept similarity matrix

CMU SCS Copyright: C. Faloutsos (2014)25 SVD - Example A = U  V T - example: data inf. retrieval brain lung = CS MD xx ‘strength’ of CS-concept

CMU SCS Copyright: C. Faloutsos (2014)26 SVD - Example A = U  V T - example: data inf. retrieval brain lung = CS MD xx term-to-concept similarity matrix CS-concept

CMU SCS Copyright: C. Faloutsos (2014)27 SVD - Example A = U  V T - example: data inf. retrieval brain lung = CS MD xx term-to-concept similarity matrix CS-concept

CMU SCS Copyright: C. Faloutsos (2014)28 SVD - Detailed outline Motivation Definition - properties Interpretation Complexity Case studies Additional properties

CMU SCS Copyright: C. Faloutsos (2014)29 SVD - Interpretation #1 ‘documents’, ‘terms’ and ‘concepts’: U: document-to-concept similarity matrix V: term-to-concept sim. matrix  : its diagonal elements: ‘strength’ of each concept

CMU SCS Copyright: C. Faloutsos (2014)30 SVD – Interpretation #1 ‘documents’, ‘terms’ and ‘concepts’: Q: if A is the document-to-term matrix, what is A T A? A: Q: A A T ? A:

CMU SCS Copyright: C. Faloutsos (2014)31 SVD – Interpretation #1 ‘documents’, ‘terms’ and ‘concepts’: Q: if A is the document-to-term matrix, what is A T A? A: term-to-term ([m x m]) similarity matrix Q: A A T ? A: document-to-document ([n x n]) similarity matrix

CMU SCS Copyright: C. Faloutsos (2014)P1-32Copyright: Faloutsos, Tong (2009) 2-32 SVD properties V are the eigenvectors of the covariance matrix A T A U are the eigenvectors of the Gram (inner- product) matrix AA T Further reading: 1. Ian T. Jolliffe, Principal Component Analysis (2 nd ed), Springer, Gilbert Strang, Linear Algebra and Its Applications (4 th ed), Brooks Cole, 2005.

CMU SCS Copyright: C. Faloutsos (2014)33 SVD - Interpretation #2 best axis to project on: (‘best’ = min sum of squares of projection errors)

CMU SCS Copyright: C. Faloutsos (2014)34 SVD - Motivation

CMU SCS Copyright: C. Faloutsos (2014)35 SVD - interpretation #2 minimum RMS error SVD: gives best axis to project v1 first singular vector

CMU SCS Copyright: C. Faloutsos (2014)36 SVD - Interpretation #2

CMU SCS Copyright: C. Faloutsos (2014)37 SVD - Interpretation #2 A = U  V T - example: = xx v1

CMU SCS Copyright: C. Faloutsos (2014)38 SVD - Interpretation #2 A = U  V T - example: = xx variance (‘spread’) on the v1 axis

CMU SCS Copyright: C. Faloutsos (2014)39 SVD - Interpretation #2 A = U  V T - example: –U  gives the coordinates of the points in the projection axis = xx

CMU SCS Copyright: C. Faloutsos (2014)40 SVD - Interpretation #2 More details Q: how exactly is dim. reduction done? = xx

CMU SCS Copyright: C. Faloutsos (2014)41 SVD - Interpretation #2 More details Q: how exactly is dim. reduction done? A: set the smallest singular values to zero: = xx

CMU SCS Copyright: C. Faloutsos (2014)42 SVD - Interpretation #2 ~ xx

CMU SCS Copyright: C. Faloutsos (2014)43 SVD - Interpretation #2 ~ xx

CMU SCS Copyright: C. Faloutsos (2014)44 SVD - Interpretation #2 ~ xx

CMU SCS Copyright: C. Faloutsos (2014)45 SVD - Interpretation #2 ~

CMU SCS Copyright: C. Faloutsos (2014)46 SVD - Interpretation #2 Exactly equivalent: ‘spectral decomposition’ of the matrix: = xx

CMU SCS Copyright: C. Faloutsos (2014)47 SVD - Interpretation #2 Exactly equivalent: ‘spectral decomposition’ of the matrix: = xx u1u1 u2u2 1 2 v1v1 v2v2

CMU SCS Copyright: C. Faloutsos (2014)48 SVD - Interpretation #2 Exactly equivalent: ‘spectral decomposition’ of the matrix: =u1u1 1 vT1vT1 u2u2 2 vT2vT n m

CMU SCS Copyright: C. Faloutsos (2014)49 SVD - Interpretation #2 Exactly equivalent: ‘spectral decomposition’ of the matrix: =u1u1 1 vT1vT1 u2u2 2 vT2vT n m n x 1 1 x m r terms

CMU SCS Copyright: C. Faloutsos (2014)50 SVD - Interpretation #2 approximation / dim. reduction: by keeping the first few terms (Q: how many?) =u1u1 1 vT1vT1 u2u2 2 vT2vT n m assume: 1 >= 2 >=...

CMU SCS Copyright: C. Faloutsos (2014)51 SVD - Interpretation #2 A (heuristic - [Fukunaga]): keep 80-90% of ‘energy’ (= sum of squares of i ’s) =u1u1 1 vT1vT1 u2u2 2 vT2vT n m assume: 1 >= 2 >=...

CMU SCS Copyright: C. Faloutsos (2014)52 Pictorially: matrix form of SVD –Best rank-k approximation in L2 A m n  m n U VTVT 

CMU SCS Copyright: C. Faloutsos (2014)53 Pictorially: Spectral form of SVD –Best rank-k approximation in L2 A m n  + 1u1v11u1v1 2u2v22u2v2

CMU SCS Copyright: C. Faloutsos (2014)54 SVD - Detailed outline Motivation Definition - properties Interpretation –#1: documents/terms/concepts –#2: dim. reduction –#3: picking non-zero, rectangular ‘blobs’ Complexity Case studies Additional properties

CMU SCS Copyright: C. Faloutsos (2014)55 SVD - Interpretation #3 finds non-zero ‘blobs’ in a data matrix = xx

CMU SCS Copyright: C. Faloutsos (2014)56 SVD - Interpretation #3 finds non-zero ‘blobs’ in a data matrix = xx

CMU SCS Copyright: C. Faloutsos (2014)P1-57 SVD - Interpretation #3 finds non-zero ‘blobs’ in a data matrix = ‘communities’ (bi-partite cores, here) Row 1 Row 4 Col 1 Col 3 Col 4 Row 5 Row 7

CMU SCS Copyright: C. Faloutsos (2014)58 SVD - Interpretation #3 Drill: find the SVD, ‘by inspection’! Q: rank = ?? = xx??

CMU SCS Copyright: C. Faloutsos (2014)59 SVD - Interpretation #3 A: rank = 2 (2 linearly independent rows/cols) = xx??

CMU SCS Copyright: C. Faloutsos (2014)60 SVD - Interpretation #3 A: rank = 2 (2 linearly independent rows/cols) = xx orthogonal??

CMU SCS Copyright: C. Faloutsos (2014)61 SVD - Interpretation #3 column vectors: are orthogonal - but not unit vectors: = xx 1/sqrt(3) 0 0 1/sqrt(2)

CMU SCS Copyright: C. Faloutsos (2014)62 SVD - Interpretation #3 and the singular values are: = xx 1/sqrt(3) 0 0 1/sqrt(2)

CMU SCS Copyright: C. Faloutsos (2014)63 SVD - Interpretation #3 Q: How to check we are correct? = xx 1/sqrt(3) 0 0 1/sqrt(2)

CMU SCS Copyright: C. Faloutsos (2014)64 SVD - Interpretation #3 A: SVD properties: –matrix product should give back matrix A –matrix U should be column-orthonormal, i.e., columns should be unit vectors, orthogonal to each other –ditto for matrix V –matrix  should be diagonal, with positive values

CMU SCS Copyright: C. Faloutsos (2014)65 SVD - Detailed outline Motivation Definition - properties Interpretation Complexity Case studies Additional properties

CMU SCS Copyright: C. Faloutsos (2014)66 SVD - Complexity O( n * m * m) or O( n * n * m) (whichever is less) less work, if we just want singular values or if we want first k singular vectors or if the matrix is sparse [Berry] Implemented: in any linear algebra package (LINPACK, matlab, Splus/R, mathematica...)

CMU SCS Copyright: C. Faloutsos (2014)67 SVD - conclusions so far SVD: A= U  V T : unique (*) U: document-to-concept similarities V: term-to-concept similarities  : strength of each concept dim. reduction: keep the first few strongest singular values (80-90% of ‘energy’) –SVD: picks up linear correlations SVD: picks up non-zero ‘blobs’

CMU SCS Copyright: C. Faloutsos (2014)68 References Berry, Michael: Fukunaga, K. (1990). Introduction to Statistical Pattern Recognition, Academic Press. Press, W. H., S. A. Teukolsky, et al. (1992). Numerical Recipes in C, Cambridge University Press.