Docsity

Finding Optimal Subspace for Data Projection with Symmetric Matrices and Eigenvectors, Slides of Artificial Intelligence

Partial preview of the text

Download Finding Optimal Subspace for Data Projection with Symmetric Matrices and Eigenvectors and more Slides Artificial Intelligence in PDF only on Docsity!

CSE 151 Machine Learning

Projecting Data

How to find the subspace S to project to? One option: PCA subspace

Symmetric A

  1. All ci are real
  2. All xi are orthonormal

A X = X C

A = X C X

T since X T = X

  • for orthonormal matrices X = an orthonormal basis of R n (for symmetric A)

Properties of Symmetric A

max

x∈R n

x

￿

Ax

Such that:^ ￿x￿^ = 1

Solution: x = x 1 (eigenvector for the largest eigenvalue) maximum value of x T Ax is the largest eigenvalue Question: If x is an eigenvector with eigenvalue c, what is x T Ax?

In Class Problem

Let A = a symmetric d x d matrix X = [x 1 , .., xk], where xi = i-th eigenvector of A Show that: (a) Entry (i, i) of X T AX is ci, the i-th eigenvalue of A (b) Entry (i, j) of X T AX is 0, when i is not equal to j Each xi has norm 1

Covariance Matrix

Suppose x 1 ,..,xn are data points in R d Covariance matrix of x 1 ,..,xn: Σ = 1 n n ￿ i= (xi − μ)(xi − μ) ￿ where: μ = 1 n n ￿ i= xi

How to find a good subspace?

Data lies on a line Direction 1 Direction 2 Direction 1 projections Direction 2 projections

How to find a good subspace?

Data lies almost on a line Direction 1 Direction 2 Direction 1 projections Direction 2 projections Find the direction of maximum variance

Dimension Reduction Algorithm

Given data matrix Xn x d

  1. Compute mean m of the data vectors
  2. Compute covariance matrix: Σ = 1 n n ￿ i= (xi − m)(xi − m) ￿

3. Compute Ukxd, the top k eigenvectors of Σ

  1. Project: P(X) = XU T