I am not getting this eigen value or eigen vector part.
Plz make me clear of it.
PCA in Data Augmentation
Hey, @Bhawna,
Principal Component Analysis :
PCA finds Principal components of the data. So what are principal components then? They’re the underlying structure in the data. They are the directions where there is the most variance, the directions where the data is most spread out.
EigenVectors and EigenValues :
An eigenvector is a direction of the line (vertical, horizontal, 45 degrees, etc.). An eigenvalue is a number, telling you how much variance there is in the data in that direction.
In fact, the amount of eigenvectors/values that exist equals the number of dimensions the data set has. Say I’m measuring age and hours on the internet. there are 2 variables, it’s a 2-dimensional data set, therefore there are 2 eigenvectors/values.
Example:
Here is a graph with oval,
At the moment the oval is on an x-y axis. x could be age and y hours on the internet. These are the two dimensions that my data set is currently being measured in. Now remember that the principal component was a line that will split the data such that it has maximum variance:
So line will be longways, as this line can represent data with maximum variance.
It turns out the other eigenvector (remember there are only two of them as it’s a 2-D problem) is perpendicular to the principal component. As we said, the eigenvectors have to be able to span the whole x-y area, in order to do this (most effectively), the two directions need to be orthogonal (i.e. 90 degrees) to one another.
The eigenvectors have given us a much more useful axis to frame the data in. We can now re-frame the data in these new dimensions. It would look like this:
Now coming to your problem:
Suppose we have a m x n dimensional coloured image. Then we have an mxnx3 dimensional matrix for the corresponding image. We convert each image into a (m x n, 3) dimensional 2-d matrix. such that we have m*n elements in each column and 3 such columns. We can compute the covariance matrix (which will be a 3x3 dimensional matrix as a number of columns is 3) for this matrix.
Next step is to compute the direction of maximum variance in the RGB colour samples which are done by computing the eigenvectors of the covariance matrix and sorting them in decreasing order of their eigenvalues. This gives us the Principal Components of the RGB colour channels.
Next to colour augment the image we take the dot product of the eigenvectors with the corresponding eigenvalues times a random number. (the random numbers for the 3 different colours are different and are taken from a normal distribution)
This forms the delta which we want to add to our normalised image data. (Remember we normalise the data before computing the PCA).
The mathematical formulation of the delta is given below,
The delta value is shown alongside. It is this value which is added/subtracted to get the new colour values. Here p represents the eigen vectors and alpha represents the random normal values and lambda the eigen value.
@chiraggandhi70726 @ vasu gupta
Topic is different from this thread
Sir I have to use ML in topic " Healthcare & Biomedical devices", Designing devices that would help in managing healthcare better in college hackathon.
plz help me and reply asap
Can u give any example for this