PrincipalComponent Analysis (PCA):
PCAis astatistical technique used to reduce the
number of input variables in adataset while
retaining as much variance (information) as
possible.
Steps of PCA:
1. Standardize the data - Scale features so
they have mean = 0and standard deviation=
1.
2. Calculate the Covariance Matrix
Understand how features vary with respect
to each other.
3. Compute Eigenvalues and Eigenvectors -
These identify the principal components
(directions of maximum variance).
4. Sort Eigenvectors - Rank them by their
corresponding eigenvalues in descending
order.
5. Select top K components - Choose the top
K eigenvectors that capture most of the
variance.
6. Transform the data - Project the original
data ontothe selected principalcomp
to obtain a lower-dimensional dataset.