0% found this document useful (0 votes)
115 views

Multivariate Data Analysis

This document discusses principal component analysis (PCA) and provides two examples of applying PCA. It introduces PCA and its alternative derivation using singular value decomposition. The first example applies PCA to noisy images of handwritten digits to reconstruct the images using the top 10 principal components. It shows how to plot the original and reconstructed images. The second example loads digit data, applies PCA to extract the first two principal components, and plots the resulting low-dimensional data.

Uploaded by

Fahim Khalid
Copyright
© © All Rights Reserved
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
115 views

Multivariate Data Analysis

This document discusses principal component analysis (PCA) and provides two examples of applying PCA. It introduces PCA and its alternative derivation using singular value decomposition. The first example applies PCA to noisy images of handwritten digits to reconstruct the images using the top 10 principal components. It shows how to plot the original and reconstructed images. The second example loads digit data, applies PCA to extract the first two principal components, and plots the resulting low-dimensional data.

Uploaded by

Fahim Khalid
Copyright
© © All Rights Reserved
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 23

Principal Component Analysis

(PCA)
Principal Component Analysis
(PCA)
Principal Component Analysis
(PCA)
Principal Component Analysis
(PCA)
Principal Component Analysis
(PCA)
Principal Component Analysis
(PCA)
Principal Component Analysis
(PCA)
Principal Component Analysis
(PCA)
Principal Component Analysis
(PCA)
Principal Component Analysis
(PCA)
Alternative Derivation
(PCA)
Alternative Derivation
(PCA)
Alternative Derivation
(PCA)
Alternative Derivation
(PCA)
Singular Value Decomposition
Singular Value Decomposition
Singular Value Decomposition
Example 1
Use the data set "noisy.mat" available on
your CD. The data set consists of 1965,
20-pixel-by-28-pixel grey-scale images
distorted by adding Gaussian noises to
each pixel with s=25.

Example 1
Apply PCA to the noisy data. Suppose the
intrinsic dimensionality of the data is 10.
Compute reconstructed images using the
top d = 10 eigenvectors and plot original
and reconstructed images

Example 1
If original images are stored in matrix X (it is 560
by 1965 matrix) and reconstructed images are in
matrix X_hat , you can type in
colormap gray
and then
imagesc(reshape(X(:, 10), 20 28))
imagesc(reshape(X_hat(:, 10), 20 28))
to plot the 10th original image and its
reconstruction.

Example 2
Example 2
Load the sample data, which includes digits 2 and 3 of
64 measurements on a sample of 400.

load 2_3.mat

Extract appropriate features by PCA

[u s v]=svd(X','econ');

Create data

Low_dimensional_data=u(:,1:2);
Observe low dimensional data
Imagesc(Low_dimensional_data)

You might also like