SlideShare a Scribd company logo
2
Most read
3
Most read
16
Most read
Introduction to
PCA
By NAGA V SATYANARAYANA K
WHY PCA IN ML
• While working with high-dimensional data, machine learning
models often seem to overfit, and this reduces the ability to
generalize past the training set examples. Hence, it is important to
perform dimensionality reduction techniques before creating a
model.
• Principal Component Analysis (PCA) is one of the most
commonly used unsupervised machine learning algorithms across
a variety of applications: exploratory data analysis, dimensionality
reduction, information compression, data de-noising, and plenty
more.
Department of Electronics & Communication Engineering
Annamalai University
RAC Meeting – 14/12/2022
WHAT IS PCA
• The Principal Component Analysis is a popular unsupervised learning technique for reducing the
dimensionality of data. It increases interpretability yet, at the same time, it minimizes information loss. It
helps to find the most significant features in a dataset and makes the data easy for plotting in 2D and 3D.
PCA helps in finding a sequence of linear combinations of variables.
• In the above figure, we have several points plotted on a 2-D plane. There are two principal components. PC1
is the primary principal component that explains the maximum variance in the data. PC2 is another principal
component that is orthogonal to PC1.
Department of Electronics & Communication Engineering
Annamalai University
RAC Meeting – 14/12/2022
What is a Principal Component?
• The Principal Components are a straight line that captures most of the
variance of the data. They have a direction and magnitude. Principal
components are orthogonal projections (perpendicular) of data onto
lower-dimensional space.
Department of Electronics & Communication Engineering
Annamalai University
RAC Meeting – 14/12/2022
EXAMPLE
• Before we delve into its inner workings, let’s first get a better understanding of PCA.
• Imagine we have a 2-dimensional dataset. Each dimension can be represented as a
feature column:
• We can represent the same dataset as a scatterplot:
Department of Electronics & Communication Engineering
Annamalai University
RAC Meeting – 14/12/2022
• The main aim of PCA is to find such principal components, which can
describe the data points with a set of... well, principal components.
• The principal components are vectors, but they are not chosen at
random. The first principal component is computed so that it explains
the greatest amount of variance in the original features. The second
component is orthogonal to the first, and it explains the greatest
amount of variance left after the first principal component.
• The original data can be represented as feature vectors. PCA allows us
to go a step further and represent the data as linear combinations of
principal components. Getting principal components is equivalent to a
linear transformation of data from the feature1 x feature2 axis to a
PCA1 x PCA2 axis.
Department of Electronics & Communication Engineering
Annamalai University
RAC Meeting – 14/12/2022
There are multiple ways to calculate PCA:
1.Eigen decomposition of the covariance matrix
2.Singular value decomposition of the data matrix
3.Eigenvalue approximation via power iterative computation
4.Non-linear iterative partial least squares (NIPALS) computation
5.… and more.
Department of Electronics & Communication Engineering
Annamalai University
RAC Meeting – 14/12/2022
• Feature standardization. We standardize each feature to
have a mean of 0 and a variance of 1. As we explain later in
assumptions and limitations, features with values that are on
different orders of magnitude prevent PCA from computing
the best principal components.
• Standardization is one type of scaling technique where the
values are centered around the mean with a unit standard
deviation. This means that the mean of the attribute becomes
zero and the resultant distribution has a unit standard
deviation.
• Here’s the formula for standardization:
1. Feature standardization
Department of Electronics & Communication Engineering
Annamalai University
RAC Meeting – 14/12/2022
2. covariance matrix computation
• Obtain the covariance matrix computation.
The covariance matrix is a square matrix, of d x
d dimensions, where d stands for “dimension”
(or feature or column, if our data is tabular). It
shows the pairwise feature correlation between
each feature.
• Construct a square matrix to express the
correlation between two or more features in a
multidimensional dataset.
Department of Electronics & Communication Engineering
Annamalai University
RAC Meeting – 14/12/2022
3.Calculate the eigen decomposition of the
covariance matrix.
• We calculate the eigenvectors (unit vectors) and their associated
eigenvalues (scalars by which we multiply the eigenvector) of the
covariance matrix.
• Calculate the eigenvectors/unit vectors and eigenvalues. Eigenvalues are
scalars by which we multiply the eigenvector of the covariance matrix.
Department of Electronics & Communication Engineering
Annamalai University
RAC Meeting – 14/12/2022
4. Sort the eigenvectors from the highest eigenvalue to
the lowest.
• The eigenvector with the highest eigenvalue is the first principal
component. Higher eigenvalues correspond to greater amounts of
shared variance explained.
Department of Electronics & Communication Engineering
Annamalai University
RAC Meeting – 14/12/2022
5. Select the number of principal components.
• Select the top N eigenvectors (based on their eigenvalues) to become
the N principal components. The optimal number of principal
components is both subjective and problem-dependent. Usually, we
look at the cumulative amount of shared variance explained by the
combination of principal components and pick that number of
components, which still significantly explains the shared variance.
Department of Electronics & Communication Engineering
Annamalai University
RAC Meeting – 14/12/2022
How does Principal Component Analysis Work?
Department of Electronics & Communication Engineering
Annamalai University
RAC Meeting – 14/12/2022
Advantages
1.Easy to compute. PCA is based on linear algebra, which is
computationally easy to solve by computers.
2.Speeds up other machine learning algorithms. Machine learning
algorithms converge faster when trained on principal components
instead of the original dataset.
3.Counteracts the issues of high-dimensional data. High-dimensional
data causes regression-based algorithms to overfit easily. By using
PCA beforehand to lower the dimensions of the training dataset, we
prevent the predictive algorithms from overfitting.
Department of Electronics & Communication Engineering
Annamalai University
RAC Meeting – 14/12/2022
Disadvantages
1.Low interpretability of principal components. Principal components
are linear combinations of the features from the original data, but they
are not as easy to interpret. For example, it is difficult to tell which are
the most important features in the dataset after computing principal
components.
2.The trade-off between information loss and dimensionality reduction.
Although dimensionality reduction is useful, it comes at a cost.
Information loss is a necessary part of PCA. Balancing the trade-off
between dimensionality reduction and information loss is unfortunately
a necessary compromise that we have to make when using PCA.
Department of Electronics & Communication Engineering
Annamalai University
RAC Meeting – 14/12/2022
Applications of PCA in Machine Learning
• PCA is used to visualize multidimensional data.
• It is used to reduce the number of dimensions in healthcare data.
• PCA can help resize an image.
• It can be used in finance to analyze stock data and forecast returns.
• PCA helps to find patterns in the high-dimensional datasets.
Visualize multidimensional data. Data visualizations are a great tool for
communicating multidimensional data as 2- or 3-dimensional plots.
Compress information. Principal Component Analysis is used to compress
information to store and transmit data more efficiently. For example, it can be
used to compress images without losing too much quality, or in signal processing.
The technique has successfully been applied across a wide range of compression
problems in pattern recognition (specifically face recognition), image recognition,
and more.
Department of Electronics & Communication Engineering
Annamalai University
RAC Meeting – 14/12/2022
• Simplify complex business decisions. PCA has been employed to
simplify traditionally complex business decisions. For example,
traders use over 300 financial instruments to manage portfolios. The
algorithm has proven successful in the risk management of interest
rate derivative portfolios, lowering the number of financial
instruments from more than 300 to just 3-4 principal components.
• Clarify convoluted scientific processes. The algorithm has been
applied extensively in the understanding of convoluted and
multidirectional factors, which increase the probability of neural
ensembles to trigger action potentials.
Contd… Department of Electronics & Communication Engineering
Annamalai University
RAC Meeting – 14/12/2022
THANK YOU
Department of Electronics & Communication Engineering
Annamalai University
RAC Meeting – 14/12/2022

More Related Content

PDF
13_Data Preprocessing in Python.pptx (1).pdf
PPTX
Deep learning(UNIT 3) BY Ms SURBHI SAROHA
PDF
IRJET- Comparative Study of PCA, KPCA, KFA and LDA Algorithms for Face Re...
PDF
IRJET - An User Friendly Interface for Data Preprocessing and Visualizati...
PPTX
M5.pptx
PDF
IRJET - An Overview of Machine Learning Algorithms for Data Science
PPTX
Applications of machine learning in Wireless sensor networks.
PDF
Principal Component Analysis in Machine Learning.pdf
13_Data Preprocessing in Python.pptx (1).pdf
Deep learning(UNIT 3) BY Ms SURBHI SAROHA
IRJET- Comparative Study of PCA, KPCA, KFA and LDA Algorithms for Face Re...
IRJET - An User Friendly Interface for Data Preprocessing and Visualizati...
M5.pptx
IRJET - An Overview of Machine Learning Algorithms for Data Science
Applications of machine learning in Wireless sensor networks.
Principal Component Analysis in Machine Learning.pdf

Similar to Principal component analysis in machine L (20)

PPTX
Module-4_Part-II.pptx
PDF
PDF
CASE STUDY: ADMISSION PREDICTION IN ENGINEERING AND TECHNOLOGY COLLEGES
PDF
Survey on Feature Selection and Dimensionality Reduction Techniques
PPTX
UNIT-2. unsupervised learning of machine learning
PPTX
Principal Component Analysis (PCA).pptx
PDF
Email Spam Detection Using Machine Learning
PDF
High dimensionality reduction on graphical data
PDF
TOWARDS REDUCTION OF DATA FLOW IN A DISTRIBUTED NETWORK USING PRINCIPAL COMPO...
PDF
Distributed Feature Selection for Efficient Economic Big Data Analysis
PDF
Parallel KNN for Big Data using Adaptive Indexing
PDF
IRJET- Machine Learning
PDF
Comparative Study of Enchancement of Automated Student Attendance System Usin...
PPTX
introduction to Statistical Theory.pptx
PDF
Density Based Clustering Approach for Solving the Software Component Restruct...
PDF
IRJET- Intelligent Character Recognition of Handwritten Characters
PDF
Recuriter Recommendation System
PPTX
EDAB - Principal Components Analysis and Classification -Module - 5.pptx
PDF
IRJET - Rainfall Forecasting using Weka Data Mining Tool
PDF
DA ST-1 SET-B-Solution.pdf we also provide the many type of solution
Module-4_Part-II.pptx
CASE STUDY: ADMISSION PREDICTION IN ENGINEERING AND TECHNOLOGY COLLEGES
Survey on Feature Selection and Dimensionality Reduction Techniques
UNIT-2. unsupervised learning of machine learning
Principal Component Analysis (PCA).pptx
Email Spam Detection Using Machine Learning
High dimensionality reduction on graphical data
TOWARDS REDUCTION OF DATA FLOW IN A DISTRIBUTED NETWORK USING PRINCIPAL COMPO...
Distributed Feature Selection for Efficient Economic Big Data Analysis
Parallel KNN for Big Data using Adaptive Indexing
IRJET- Machine Learning
Comparative Study of Enchancement of Automated Student Attendance System Usin...
introduction to Statistical Theory.pptx
Density Based Clustering Approach for Solving the Software Component Restruct...
IRJET- Intelligent Character Recognition of Handwritten Characters
Recuriter Recommendation System
EDAB - Principal Components Analysis and Classification -Module - 5.pptx
IRJET - Rainfall Forecasting using Weka Data Mining Tool
DA ST-1 SET-B-Solution.pdf we also provide the many type of solution
Ad

More from satyanarayana242612 (11)

PPTX
introduction to Microwave engineering
PPTX
direction coupler in microwave engineering
PPTX
ch-2.2 histogram image processing .pptx
PPTX
segmentation in image processing .pptx
PPTX
ch-1.2 elements of visualperception.pptx
PPTX
ch-1.1 image processing fundamentals.pptx
PDF
DFT,DCT TRANSFORMS.pdf
PDF
imagesegmentationppt-120409061123-phpapp01 (2).pdf
PDF
csc447dipch10-160628144302.pdf
PDF
imagesegmentationppt-120409061123-phpapp01 (2).pdf
PPTX
ch-2.5 Image Enhancement in FREQUENCY Domain.pptx
introduction to Microwave engineering
direction coupler in microwave engineering
ch-2.2 histogram image processing .pptx
segmentation in image processing .pptx
ch-1.2 elements of visualperception.pptx
ch-1.1 image processing fundamentals.pptx
DFT,DCT TRANSFORMS.pdf
imagesegmentationppt-120409061123-phpapp01 (2).pdf
csc447dipch10-160628144302.pdf
imagesegmentationppt-120409061123-phpapp01 (2).pdf
ch-2.5 Image Enhancement in FREQUENCY Domain.pptx
Ad

Recently uploaded (20)

DOCX
ASol_English-Language-Literature-Set-1-27-02-2023-converted.docx
PPTX
M Tech Sem 1 Civil Engineering Environmental Sciences.pptx
PPTX
OOP with Java - Java Introduction (Basics)
PPT
introduction to datamining and warehousing
PPTX
CH1 Production IntroductoryConcepts.pptx
PDF
PRIZ Academy - 9 Windows Thinking Where to Invest Today to Win Tomorrow.pdf
PDF
BMEC211 - INTRODUCTION TO MECHATRONICS-1.pdf
PDF
Model Code of Practice - Construction Work - 21102022 .pdf
PDF
TFEC-4-2020-Design-Guide-for-Timber-Roof-Trusses.pdf
PDF
Mitigating Risks through Effective Management for Enhancing Organizational Pe...
PPTX
Sustainable Sites - Green Building Construction
PDF
Enhancing Cyber Defense Against Zero-Day Attacks using Ensemble Neural Networks
PDF
Embodied AI: Ushering in the Next Era of Intelligent Systems
PPTX
Safety Seminar civil to be ensured for safe working.
PPTX
Foundation to blockchain - A guide to Blockchain Tech
PDF
Evaluating the Democratization of the Turkish Armed Forces from a Normative P...
PDF
July 2025 - Top 10 Read Articles in International Journal of Software Enginee...
PPTX
Infosys Presentation by1.Riyan Bagwan 2.Samadhan Naiknavare 3.Gaurav Shinde 4...
PDF
PPT on Performance Review to get promotions
PPTX
Artificial Intelligence
ASol_English-Language-Literature-Set-1-27-02-2023-converted.docx
M Tech Sem 1 Civil Engineering Environmental Sciences.pptx
OOP with Java - Java Introduction (Basics)
introduction to datamining and warehousing
CH1 Production IntroductoryConcepts.pptx
PRIZ Academy - 9 Windows Thinking Where to Invest Today to Win Tomorrow.pdf
BMEC211 - INTRODUCTION TO MECHATRONICS-1.pdf
Model Code of Practice - Construction Work - 21102022 .pdf
TFEC-4-2020-Design-Guide-for-Timber-Roof-Trusses.pdf
Mitigating Risks through Effective Management for Enhancing Organizational Pe...
Sustainable Sites - Green Building Construction
Enhancing Cyber Defense Against Zero-Day Attacks using Ensemble Neural Networks
Embodied AI: Ushering in the Next Era of Intelligent Systems
Safety Seminar civil to be ensured for safe working.
Foundation to blockchain - A guide to Blockchain Tech
Evaluating the Democratization of the Turkish Armed Forces from a Normative P...
July 2025 - Top 10 Read Articles in International Journal of Software Enginee...
Infosys Presentation by1.Riyan Bagwan 2.Samadhan Naiknavare 3.Gaurav Shinde 4...
PPT on Performance Review to get promotions
Artificial Intelligence

Principal component analysis in machine L

  • 1. Introduction to PCA By NAGA V SATYANARAYANA K
  • 2. WHY PCA IN ML • While working with high-dimensional data, machine learning models often seem to overfit, and this reduces the ability to generalize past the training set examples. Hence, it is important to perform dimensionality reduction techniques before creating a model. • Principal Component Analysis (PCA) is one of the most commonly used unsupervised machine learning algorithms across a variety of applications: exploratory data analysis, dimensionality reduction, information compression, data de-noising, and plenty more. Department of Electronics & Communication Engineering Annamalai University RAC Meeting – 14/12/2022
  • 3. WHAT IS PCA • The Principal Component Analysis is a popular unsupervised learning technique for reducing the dimensionality of data. It increases interpretability yet, at the same time, it minimizes information loss. It helps to find the most significant features in a dataset and makes the data easy for plotting in 2D and 3D. PCA helps in finding a sequence of linear combinations of variables. • In the above figure, we have several points plotted on a 2-D plane. There are two principal components. PC1 is the primary principal component that explains the maximum variance in the data. PC2 is another principal component that is orthogonal to PC1. Department of Electronics & Communication Engineering Annamalai University RAC Meeting – 14/12/2022
  • 4. What is a Principal Component? • The Principal Components are a straight line that captures most of the variance of the data. They have a direction and magnitude. Principal components are orthogonal projections (perpendicular) of data onto lower-dimensional space. Department of Electronics & Communication Engineering Annamalai University RAC Meeting – 14/12/2022
  • 5. EXAMPLE • Before we delve into its inner workings, let’s first get a better understanding of PCA. • Imagine we have a 2-dimensional dataset. Each dimension can be represented as a feature column: • We can represent the same dataset as a scatterplot: Department of Electronics & Communication Engineering Annamalai University RAC Meeting – 14/12/2022
  • 6. • The main aim of PCA is to find such principal components, which can describe the data points with a set of... well, principal components. • The principal components are vectors, but they are not chosen at random. The first principal component is computed so that it explains the greatest amount of variance in the original features. The second component is orthogonal to the first, and it explains the greatest amount of variance left after the first principal component. • The original data can be represented as feature vectors. PCA allows us to go a step further and represent the data as linear combinations of principal components. Getting principal components is equivalent to a linear transformation of data from the feature1 x feature2 axis to a PCA1 x PCA2 axis. Department of Electronics & Communication Engineering Annamalai University RAC Meeting – 14/12/2022
  • 7. There are multiple ways to calculate PCA: 1.Eigen decomposition of the covariance matrix 2.Singular value decomposition of the data matrix 3.Eigenvalue approximation via power iterative computation 4.Non-linear iterative partial least squares (NIPALS) computation 5.… and more. Department of Electronics & Communication Engineering Annamalai University RAC Meeting – 14/12/2022
  • 8. • Feature standardization. We standardize each feature to have a mean of 0 and a variance of 1. As we explain later in assumptions and limitations, features with values that are on different orders of magnitude prevent PCA from computing the best principal components. • Standardization is one type of scaling technique where the values are centered around the mean with a unit standard deviation. This means that the mean of the attribute becomes zero and the resultant distribution has a unit standard deviation. • Here’s the formula for standardization: 1. Feature standardization Department of Electronics & Communication Engineering Annamalai University RAC Meeting – 14/12/2022
  • 9. 2. covariance matrix computation • Obtain the covariance matrix computation. The covariance matrix is a square matrix, of d x d dimensions, where d stands for “dimension” (or feature or column, if our data is tabular). It shows the pairwise feature correlation between each feature. • Construct a square matrix to express the correlation between two or more features in a multidimensional dataset. Department of Electronics & Communication Engineering Annamalai University RAC Meeting – 14/12/2022
  • 10. 3.Calculate the eigen decomposition of the covariance matrix. • We calculate the eigenvectors (unit vectors) and their associated eigenvalues (scalars by which we multiply the eigenvector) of the covariance matrix. • Calculate the eigenvectors/unit vectors and eigenvalues. Eigenvalues are scalars by which we multiply the eigenvector of the covariance matrix. Department of Electronics & Communication Engineering Annamalai University RAC Meeting – 14/12/2022
  • 11. 4. Sort the eigenvectors from the highest eigenvalue to the lowest. • The eigenvector with the highest eigenvalue is the first principal component. Higher eigenvalues correspond to greater amounts of shared variance explained. Department of Electronics & Communication Engineering Annamalai University RAC Meeting – 14/12/2022
  • 12. 5. Select the number of principal components. • Select the top N eigenvectors (based on their eigenvalues) to become the N principal components. The optimal number of principal components is both subjective and problem-dependent. Usually, we look at the cumulative amount of shared variance explained by the combination of principal components and pick that number of components, which still significantly explains the shared variance. Department of Electronics & Communication Engineering Annamalai University RAC Meeting – 14/12/2022
  • 13. How does Principal Component Analysis Work? Department of Electronics & Communication Engineering Annamalai University RAC Meeting – 14/12/2022
  • 14. Advantages 1.Easy to compute. PCA is based on linear algebra, which is computationally easy to solve by computers. 2.Speeds up other machine learning algorithms. Machine learning algorithms converge faster when trained on principal components instead of the original dataset. 3.Counteracts the issues of high-dimensional data. High-dimensional data causes regression-based algorithms to overfit easily. By using PCA beforehand to lower the dimensions of the training dataset, we prevent the predictive algorithms from overfitting. Department of Electronics & Communication Engineering Annamalai University RAC Meeting – 14/12/2022
  • 15. Disadvantages 1.Low interpretability of principal components. Principal components are linear combinations of the features from the original data, but they are not as easy to interpret. For example, it is difficult to tell which are the most important features in the dataset after computing principal components. 2.The trade-off between information loss and dimensionality reduction. Although dimensionality reduction is useful, it comes at a cost. Information loss is a necessary part of PCA. Balancing the trade-off between dimensionality reduction and information loss is unfortunately a necessary compromise that we have to make when using PCA. Department of Electronics & Communication Engineering Annamalai University RAC Meeting – 14/12/2022
  • 16. Applications of PCA in Machine Learning • PCA is used to visualize multidimensional data. • It is used to reduce the number of dimensions in healthcare data. • PCA can help resize an image. • It can be used in finance to analyze stock data and forecast returns. • PCA helps to find patterns in the high-dimensional datasets. Visualize multidimensional data. Data visualizations are a great tool for communicating multidimensional data as 2- or 3-dimensional plots. Compress information. Principal Component Analysis is used to compress information to store and transmit data more efficiently. For example, it can be used to compress images without losing too much quality, or in signal processing. The technique has successfully been applied across a wide range of compression problems in pattern recognition (specifically face recognition), image recognition, and more. Department of Electronics & Communication Engineering Annamalai University RAC Meeting – 14/12/2022
  • 17. • Simplify complex business decisions. PCA has been employed to simplify traditionally complex business decisions. For example, traders use over 300 financial instruments to manage portfolios. The algorithm has proven successful in the risk management of interest rate derivative portfolios, lowering the number of financial instruments from more than 300 to just 3-4 principal components. • Clarify convoluted scientific processes. The algorithm has been applied extensively in the understanding of convoluted and multidirectional factors, which increase the probability of neural ensembles to trigger action potentials. Contd… Department of Electronics & Communication Engineering Annamalai University RAC Meeting – 14/12/2022
  • 18. THANK YOU Department of Electronics & Communication Engineering Annamalai University RAC Meeting – 14/12/2022