Course Content
Principal Component Analysis
Principal Component Analysis
1. What is Principal Component Analysis
3. Model Building
Noise Reduction
Let's look at the way PCA works, when the algorithm does not act as a data processing stage, but as the main stage. The task of noise reduction in images is just that case.
The pipeline in this case looks like this: we load the noisy data into the model, after which we can process other data using PCA and the model will restore that data. How it works? By reducing the number of main components - literally only the most important elements of the image remain, i.e. noise will be reduced.
We use the USPS dataset with numbers and the scikit-learn
library:
Let's add some noise to our images:
Create a PCA model:
Let's see what came of it! Initial noisy images:
And here is the result of PCA work:
Everything was clear?