



Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!




Steps to PCA:
it is important to standardize them (subtract the mean and divide by the
standard deviation) to ensure that each feature contributes equally to the
analysis.
relationships between the different features in the dataset. It provides
information about how the features vary together.
eigenvalues of the covariance matrix represent the principal components.
The eigenvectors are the directions
of maximum variance, while the corresponding eigenvalues indicate the
amount of variance explained by each principal component.
can select a subset of the principal components based on their
corresponding eigenvalues. Typically, you would choose the top-k
components that explain a significant portion of the variance (e.g.,90% or
more).
principal components to obtain the transformed dataset with reduced
dimensionality. Each data point is projected onto the new principal
component axes.
Given dataset withe mean = 0.
PCA is the method in which we will find a new basis, a.k.a a projection matrix,
where the original dataset can be projected onto it to reduce the data dimension
but important information still retained.
We assume there exist a low-dimension compressed representation of a data
point given by:
where we compressed of D dimensions to to M dimensions (M < D), and
the projection matrix is:
Note that also has zero mean:
We need to find a matrix that retains as much information as possible when
compressing data by projecting it onto the subspace spanned by the columns
of. Retaining most information after data compression is
equivalent to capturing the largest amount of variance in the low-dimensional
code.
We maximize the variance of the low-dimensional code using a sequential
approach. First, we consider the case when X is projected onto a single vector
(basically, this is when the projection matrix is just a vector and we
X = {x 1 , x 2 , ..., x (^) n} μ
x = ∗ x − μx
xn
z (^) n =B x
T n
xn zn
B = [b 1 , b 2 , .., b (^) M ] ∈R
D×M
z E (^) z [z] =E (^) x[ B x] =
T B E [x] =
T x 0
b 1 , b 2 , .., bM B
b ∈ R D B
The variance of the data projected onto a one-dimensional subspace equals
the eigenvalue that is associated with the basis vector b that spans this
subspace.
Therefore, to maximize the variance of the low-dimensional code, we choose
the basis vector associated with the largest eigenvalue principal
component of the data covariance matrix. This eigenvector is called the first
principal component.
The finding of vector b above can be viewed as the finding of a direction or an
axis that data varies the most. Suppose we want to find another direction besides
the one we have found, we can construct the similar vector projection problem to
find the largest variance possible, or actually the largest eigenvalue possible.
Now what we derive will be the second largest eigenvalue.
Therefore, if we want to find axes to project data, we can choose
eigenvectors of the data variance matrix that associates with
largest eigenvalues, each eigenvector corresponding to a new axis of projection.
The projection
matrix
is formed by those eigenvectors, i.e:.
Finally, the projection of dataset onto given by
will result, in new representation of data, i. e (M features
and N samples).
Note: In case me in the future forget how this algorithm works,
remember features of are not derived by removing some less
important features of X (and keeping the remaining) but by synthesizing
information from the whole dataset X and compressing them into M
new features.
Summary :
V = b Sb =
T b λb =
T λ
b 1 , b 2 , ..., bM M
B B = [b 1 , b 2 , ..., bM ]
D×N B ∈ R
D×M X =
∼
T X ∈
∼ R
M ×N
∼