SlideShare a Scribd company logo
Dimensionality Reduction
Fereshteh Sadeghi
CSEP 546
Motivation
• Clustering
• One way to summarize a complex real-valued data point with a single
categorical variable
• Dimensionality reduction
• Another way to simplify complex high-dimensional data
• Summarize data with a lower dimensional real valued vector
Motivation
• Clustering
• One way to summarize a complex real-valued data point with a single
categorical variable
• Dimensionality reduction
• Another way to simplify complex high-dimensional data
• Summarize data with a lower dimentional real valued vector
• Given data points in d dimensions
• Convert them to data points in r<d dimensions
• With minimal loss of information
Data Compression
(inches)
(cm)
Reduce data from
2D to 1D
Andrew Ng
Data Compression
Reduce data from
2D to 1D
(inches)
(cm)
Andrew Ng
Data Compression
Reduce data from 3D to 2D
Andrew Ng
Principal Component Analysis (PCA) problem formulation
Reduce from 2-dimension to 1-dimension: Find a direction (a vector )
onto which to project the data so as to minimize the projection error.
Reduce from n-dimension to k-dimension: Find vectors
onto which to project the data, so as to minimize the projection error.
Andrew Ng
principle component analysis pca - machine learning - unsupervised learning
Covariance
• Variance and Covariance:
• Measure of the “spread” of a set of points around their center of mass(mean)
• Variance:
• Measure of the deviation from the mean for points in one dimension
• Covariance:
• Measure of how much each of the dimensions vary from the mean with
respect to each other
• Covariance is measured between two dimensions
• Covariance sees if there is a relation between two dimensions
• Covariance between one dimension is the variance
Positive: Both dimensions increase or decrease together Negative: While one increase the other decrease
Covariance
• Used to find relationships between dimensions in high dimensional
data sets
The Sample mean
Eigenvector and Eigenvalue
Ax = λx
A: Square Matirx
λ: Eigenvector or characteristic vector
X: Eigenvalue or characteristic value
• The zero vector can not be an eigenvector
• The value zero can be eigenvalue
Eigenvector and Eigenvalue
Ax = λx
A: Square Matirx
λ: Eigenvector or characteristic vector
X: Eigenvalue or characteristic value
Example
Eigenvector and Eigenvalue
Ax - λx = 0
(A – λI)x = 0
B = A – λI
Bx = 0
x = B-10 = 0
If we define a new matrix B:
If B has an inverse:
BUT! an eigenvector
cannot be zero!!
x will be an eigenvector of A if and only if B does
not have an inverse, or equivalently det(B)=0 :
det(A – λI) = 0
Ax = λx
Example 1: Find the eigenvalues of
two eigenvalues: 1,  2
Note: The roots of the characteristic equation can be repeated. That is, λ1 = λ2 =…= λk.
If that happens, the eigenvalue is said to be of multiplicity k.
Example 2: Find the eigenvalues of
λ = 2 is an eigenvector of multiplicity 3.









5
1
12
2
A
)
2
)(
1
(
2
3
12
)
5
)(
2
(
5
1
12
2
2























 A
I











2
0
0
0
2
0
0
1
2
A
0
)
2
(
2
0
0
0
2
0
0
1
2
3








 



 A
I
Eigenvector and Eigenvalue
Principal Component Analysis
Input:
Summarize a D dimensional vector X with K dimensional
feature vector h(x)
Set of basis vectors:
Principal Component Analysis
Basis vectors are orthonormal
New data representation h(x)
Principal Component Analysis
New data representation h(x)
Empirical mean of the data
principle component analysis pca - machine learning - unsupervised learning
principle component analysis pca - machine learning - unsupervised learning
principle component analysis pca - machine learning - unsupervised learning
principle component analysis pca - machine learning - unsupervised learning
• The top three principal components of SIFT descriptors from a set of images are computed
• Map these principal components to the principal components of the RGB space
• pixels with similar colors share similar structures
SIFT feature visualization
Original Image
• Divide the original 372x492 image into patches:
• Each patch is an instance that contains 12x12 pixels on a grid
• View each as a 144-D vector
Application: Image compression
PCA compression: 144D  60D
PCA compression: 144D  16D
16 most important eigenvectors
2 4 6 8 10 12
2
4
6
8
10
12
2 4 6 8 10 12
2
4
6
8
10
12
2 4 6 8 10 12
2
4
6
8
10
12
2 4 6 8 10 12
2
4
6
8
10
12
2 4 6 8 10 12
2
4
6
8
10
12
2 4 6 8 10 12
2
4
6
8
10
12
2 4 6 8 10 12
2
4
6
8
10
12
2 4 6 8 10 12
2
4
6
8
10
12
2 4 6 8 10 12
2
4
6
8
10
12
2 4 6 8 10 12
2
4
6
8
10
12
2 4 6 8 10 12
2
4
6
8
10
12
2 4 6 8 10 12
2
4
6
8
10
12
2 4 6 8 10 12
2
4
6
8
10
12
2 4 6 8 10 12
2
4
6
8
10
12
2 4 6 8 10 12
2
4
6
8
10
12
2 4 6 8 10 12
2
4
6
8
10
12
PCA compression: 144D ) 6D
2 4 6 8 10 12
2
4
6
8
10
12
2 4 6 8 10 12
2
4
6
8
10
12
2 4 6 8 10 12
2
4
6
8
10
12
2 4 6 8 10 12
2
4
6
8
10
12
2 4 6 8 10 12
2
4
6
8
10
12
2 4 6 8 10 12
2
4
6
8
10
12
6 most important eigenvectors
PCA compression: 144D  3D
2 4 6 8 10 12
2
4
6
8
10
12
2 4 6 8 10 12
2
4
6
8
10
12
2 4 6 8 10 12
2
4
6
8
10
12
3 most important eigenvectors
PCA compression: 144D  1D
60 most important eigenvectors
Looks like the discrete cosine bases of JPG!...
2D Discrete Cosine Basis
http://en.wikipedia.org/wiki/Discrete_cosine_transform
Dimensionality reduction
• PCA (Principal Component Analysis):
• Find projection that maximize the variance
• ICA (Independent Component Analysis):
• Very similar to PCA except that it assumes non-Guassian features
• Multidimensional Scaling:
• Find projection that best preserves inter-point distances
• LDA(Linear Discriminant Analysis):
• Maximizing the component axes for class-separation
• …
• …

More Related Content

PPTX
Lecture 8 about data mining and how to use it.pptx
PPTX
ML-Lec-18-NEW Dimensionality Reduction-PCA (1).pptx
PPTX
machine learning.pptx
PPTX
Dimensionality Reduction and feature extraction.pptx
PPTX
PCA-LDA-Lobo.pptxttvertyuytreiopkjhgftfv
PDF
Making BIG DATA smaller
PDF
Matrix Factorization In Recommender Systems
PPTX
Ml10 dimensionality reduction-and_advanced_topics
Lecture 8 about data mining and how to use it.pptx
ML-Lec-18-NEW Dimensionality Reduction-PCA (1).pptx
machine learning.pptx
Dimensionality Reduction and feature extraction.pptx
PCA-LDA-Lobo.pptxttvertyuytreiopkjhgftfv
Making BIG DATA smaller
Matrix Factorization In Recommender Systems
Ml10 dimensionality reduction-and_advanced_topics

Similar to principle component analysis pca - machine learning - unsupervised learning (20)

PDF
Effective and Unsupervised Fractal-based Feature Selection for Very Large Dat...
PDF
Neural Networks: Principal Component Analysis (PCA)
PDF
Practical data analysis with wine
PPTX
exploring Machine Learning with best way
PDF
Lecture32
PPT
SVD.ppt
PDF
pca.pdf polymer nanoparticles and sensors
PDF
4-RSSI-Spectral Domain Image Transforms_1.pdf
PPTX
Large Scale Machine Learning with Apache Spark
ODP
Introduction to Principle Component Analysis
PPTX
Kulum alin-11 jan2014
PDF
Realtime Analytics
PPT
Data preprocessing
PPTX
pcappt-140121072949-phpapp01.pptx
PPTX
Data Mining Lecture_10(b).pptx
PPTX
DimensionalityReduction.pptx
PPTX
Week 12 Dimensionality Reduction Bagian 1
PDF
Lecture-11 principal component analysis.pdf
PDF
Principal component analysis and lda
Effective and Unsupervised Fractal-based Feature Selection for Very Large Dat...
Neural Networks: Principal Component Analysis (PCA)
Practical data analysis with wine
exploring Machine Learning with best way
Lecture32
SVD.ppt
pca.pdf polymer nanoparticles and sensors
4-RSSI-Spectral Domain Image Transforms_1.pdf
Large Scale Machine Learning with Apache Spark
Introduction to Principle Component Analysis
Kulum alin-11 jan2014
Realtime Analytics
Data preprocessing
pcappt-140121072949-phpapp01.pptx
Data Mining Lecture_10(b).pptx
DimensionalityReduction.pptx
Week 12 Dimensionality Reduction Bagian 1
Lecture-11 principal component analysis.pdf
Principal component analysis and lda
Ad

Recently uploaded (20)

PDF
VCE English Exam - Section C Student Revision Booklet
PDF
Module 4: Burden of Disease Tutorial Slides S2 2025
PDF
grade 11-chemistry_fetena_net_5883.pdf teacher guide for all student
PDF
Anesthesia in Laparoscopic Surgery in India
PPTX
Institutional Correction lecture only . . .
PDF
102 student loan defaulters named and shamed – Is someone you know on the list?
PDF
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
PPTX
master seminar digital applications in india
PDF
Sports Quiz easy sports quiz sports quiz
PDF
TR - Agricultural Crops Production NC III.pdf
PPTX
1st Inaugural Professorial Lecture held on 19th February 2020 (Governance and...
PDF
Saundersa Comprehensive Review for the NCLEX-RN Examination.pdf
PDF
Computing-Curriculum for Schools in Ghana
PDF
Abdominal Access Techniques with Prof. Dr. R K Mishra
PDF
BÀI TẬP BỔ TRỢ 4 KỸ NĂNG TIẾNG ANH 9 GLOBAL SUCCESS - CẢ NĂM - BÁM SÁT FORM Đ...
PDF
Complications of Minimal Access Surgery at WLH
PDF
Classroom Observation Tools for Teachers
PDF
O5-L3 Freight Transport Ops (International) V1.pdf
PDF
STATICS OF THE RIGID BODIES Hibbelers.pdf
PDF
Insiders guide to clinical Medicine.pdf
VCE English Exam - Section C Student Revision Booklet
Module 4: Burden of Disease Tutorial Slides S2 2025
grade 11-chemistry_fetena_net_5883.pdf teacher guide for all student
Anesthesia in Laparoscopic Surgery in India
Institutional Correction lecture only . . .
102 student loan defaulters named and shamed – Is someone you know on the list?
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
master seminar digital applications in india
Sports Quiz easy sports quiz sports quiz
TR - Agricultural Crops Production NC III.pdf
1st Inaugural Professorial Lecture held on 19th February 2020 (Governance and...
Saundersa Comprehensive Review for the NCLEX-RN Examination.pdf
Computing-Curriculum for Schools in Ghana
Abdominal Access Techniques with Prof. Dr. R K Mishra
BÀI TẬP BỔ TRỢ 4 KỸ NĂNG TIẾNG ANH 9 GLOBAL SUCCESS - CẢ NĂM - BÁM SÁT FORM Đ...
Complications of Minimal Access Surgery at WLH
Classroom Observation Tools for Teachers
O5-L3 Freight Transport Ops (International) V1.pdf
STATICS OF THE RIGID BODIES Hibbelers.pdf
Insiders guide to clinical Medicine.pdf
Ad

principle component analysis pca - machine learning - unsupervised learning

  • 2. Motivation • Clustering • One way to summarize a complex real-valued data point with a single categorical variable • Dimensionality reduction • Another way to simplify complex high-dimensional data • Summarize data with a lower dimensional real valued vector
  • 3. Motivation • Clustering • One way to summarize a complex real-valued data point with a single categorical variable • Dimensionality reduction • Another way to simplify complex high-dimensional data • Summarize data with a lower dimentional real valued vector • Given data points in d dimensions • Convert them to data points in r<d dimensions • With minimal loss of information
  • 5. Data Compression Reduce data from 2D to 1D (inches) (cm) Andrew Ng
  • 6. Data Compression Reduce data from 3D to 2D Andrew Ng
  • 7. Principal Component Analysis (PCA) problem formulation Reduce from 2-dimension to 1-dimension: Find a direction (a vector ) onto which to project the data so as to minimize the projection error. Reduce from n-dimension to k-dimension: Find vectors onto which to project the data, so as to minimize the projection error. Andrew Ng
  • 9. Covariance • Variance and Covariance: • Measure of the “spread” of a set of points around their center of mass(mean) • Variance: • Measure of the deviation from the mean for points in one dimension • Covariance: • Measure of how much each of the dimensions vary from the mean with respect to each other • Covariance is measured between two dimensions • Covariance sees if there is a relation between two dimensions • Covariance between one dimension is the variance
  • 10. Positive: Both dimensions increase or decrease together Negative: While one increase the other decrease
  • 11. Covariance • Used to find relationships between dimensions in high dimensional data sets The Sample mean
  • 12. Eigenvector and Eigenvalue Ax = λx A: Square Matirx λ: Eigenvector or characteristic vector X: Eigenvalue or characteristic value • The zero vector can not be an eigenvector • The value zero can be eigenvalue
  • 13. Eigenvector and Eigenvalue Ax = λx A: Square Matirx λ: Eigenvector or characteristic vector X: Eigenvalue or characteristic value Example
  • 14. Eigenvector and Eigenvalue Ax - λx = 0 (A – λI)x = 0 B = A – λI Bx = 0 x = B-10 = 0 If we define a new matrix B: If B has an inverse: BUT! an eigenvector cannot be zero!! x will be an eigenvector of A if and only if B does not have an inverse, or equivalently det(B)=0 : det(A – λI) = 0 Ax = λx
  • 15. Example 1: Find the eigenvalues of two eigenvalues: 1,  2 Note: The roots of the characteristic equation can be repeated. That is, λ1 = λ2 =…= λk. If that happens, the eigenvalue is said to be of multiplicity k. Example 2: Find the eigenvalues of λ = 2 is an eigenvector of multiplicity 3.          5 1 12 2 A ) 2 )( 1 ( 2 3 12 ) 5 )( 2 ( 5 1 12 2 2                         A I            2 0 0 0 2 0 0 1 2 A 0 ) 2 ( 2 0 0 0 2 0 0 1 2 3               A I Eigenvector and Eigenvalue
  • 16. Principal Component Analysis Input: Summarize a D dimensional vector X with K dimensional feature vector h(x) Set of basis vectors:
  • 17. Principal Component Analysis Basis vectors are orthonormal New data representation h(x)
  • 18. Principal Component Analysis New data representation h(x) Empirical mean of the data
  • 23. • The top three principal components of SIFT descriptors from a set of images are computed • Map these principal components to the principal components of the RGB space • pixels with similar colors share similar structures SIFT feature visualization
  • 24. Original Image • Divide the original 372x492 image into patches: • Each patch is an instance that contains 12x12 pixels on a grid • View each as a 144-D vector Application: Image compression
  • 27. 16 most important eigenvectors 2 4 6 8 10 12 2 4 6 8 10 12 2 4 6 8 10 12 2 4 6 8 10 12 2 4 6 8 10 12 2 4 6 8 10 12 2 4 6 8 10 12 2 4 6 8 10 12 2 4 6 8 10 12 2 4 6 8 10 12 2 4 6 8 10 12 2 4 6 8 10 12 2 4 6 8 10 12 2 4 6 8 10 12 2 4 6 8 10 12 2 4 6 8 10 12 2 4 6 8 10 12 2 4 6 8 10 12 2 4 6 8 10 12 2 4 6 8 10 12 2 4 6 8 10 12 2 4 6 8 10 12 2 4 6 8 10 12 2 4 6 8 10 12 2 4 6 8 10 12 2 4 6 8 10 12 2 4 6 8 10 12 2 4 6 8 10 12 2 4 6 8 10 12 2 4 6 8 10 12 2 4 6 8 10 12 2 4 6 8 10 12
  • 29. 2 4 6 8 10 12 2 4 6 8 10 12 2 4 6 8 10 12 2 4 6 8 10 12 2 4 6 8 10 12 2 4 6 8 10 12 2 4 6 8 10 12 2 4 6 8 10 12 2 4 6 8 10 12 2 4 6 8 10 12 2 4 6 8 10 12 2 4 6 8 10 12 6 most important eigenvectors
  • 31. 2 4 6 8 10 12 2 4 6 8 10 12 2 4 6 8 10 12 2 4 6 8 10 12 2 4 6 8 10 12 2 4 6 8 10 12 3 most important eigenvectors
  • 33. 60 most important eigenvectors Looks like the discrete cosine bases of JPG!...
  • 34. 2D Discrete Cosine Basis http://en.wikipedia.org/wiki/Discrete_cosine_transform
  • 35. Dimensionality reduction • PCA (Principal Component Analysis): • Find projection that maximize the variance • ICA (Independent Component Analysis): • Very similar to PCA except that it assumes non-Guassian features • Multidimensional Scaling: • Find projection that best preserves inter-point distances • LDA(Linear Discriminant Analysis): • Maximizing the component axes for class-separation • … • …