Академический Документы
Профессиональный Документы
Культура Документы
- Load ‘mandrill’
- Convert it into a gray scale image
- Treat rows of the image as variables and columns as observations.
- Apply PCA to the data matrix (after appropriate mean-subtraction)
o Use “imagesc” function to visualize Y and V matrices.
o Comment on why the first principal component should be the most important, given the
distribution of intensities in rows of the actual image.
o Comment on whether the “eigen-columns” (i.e. principal component directions) can be
thought of as the ingredients that can be combined to generate individual columns of
the images.
o Comment on whether the principal components can be thought of as the ingredients
that can be combined to generate individual rows of the images.
- Load ‘mandrill’
- Convert it into a gray scale image
- Divide the image into blocks with size 10x10
- Treat individual locations within a block as variables. Their values for different blocks are
observations. Create a data matrix according to this scheme.
- Apply PCA to the data matrix (after appropriate mean-subtraction)
o Find a way to visualize principal component directions and principal components
The principal component directions, i.e. eigenvectors should be reshaped and
displayed as 10x10 blocks. Why is this particular visualization suitable in this
case?
The principal components should be displayed as mxn matrices (in accordance
with position of the blocks within the images). Why is this particular
visualization suitable in this case?
o Comment on why the first principal component (and principal component direction)
should be important, given the distribution of intensities in the original image.
o Comment on whether the “eigen-blocks” (i.e. principal component directions) can be
thought of as the ingredients of the image.
o Comment on whether the principal components can be thought of as the ingredients of
the image.
Repeat for block-sizes 5x5 and 20x20. Which block-size will you prefer for data compression?
Your job is to utilize PCA to “correct” the alignment of the image. Think of the binary image as
“scatter plot” of random variables X and Y. The origin of the scatter plot is pixel (0, 0). X and Y
increase in up-down and left-right directions respectively.