PCA
From Ufldl
(→Number of components to retain) |
(→PCA on Images) |
||
Line 254: | Line 254: | ||
Note: Usually we use images of outdoor scenes with grass, trees, etc., and cut out small (say 16x16) image patches randomly from these to train the algorithm. But in practice most feature learning algorithms are extremely robust to the exact type of image it is trained on, so most images taken with a normal camera, so long as they aren't excessively blurry or have strange artifacts, should work. | Note: Usually we use images of outdoor scenes with grass, trees, etc., and cut out small (say 16x16) image patches randomly from these to train the algorithm. But in practice most feature learning algorithms are extremely robust to the exact type of image it is trained on, so most images taken with a normal camera, so long as they aren't excessively blurry or have strange artifacts, should work. | ||
- | + | When training on natural images, it makes little sense to estimate a separate mean and | |
variance for each pixel, because the statistics in one part | variance for each pixel, because the statistics in one part | ||
of the image should (theoretically) be the same as any other. | of the image should (theoretically) be the same as any other. | ||
- | This property of images is called '''stationarity''' | + | This property of images is called '''stationarity.''' |
In detail, in order for PCA to work well, informally we require that (i) The | In detail, in order for PCA to work well, informally we require that (i) The | ||
Line 294: | Line 294: | ||
this is not the same thing as estimating a mean value separately for each pixel <math>\textstyle x_j</math>. | this is not the same thing as estimating a mean value separately for each pixel <math>\textstyle x_j</math>. | ||
- | If you are training your algorithm on images other than natural images (for example, images of handwritten characters, or images of single isolated objects centered against a white background), other types of normalization might be worth considering, and the best choice may be application dependent. But when training on natural images, using the per-image mean normalization as the | + | If you are training your algorithm on images other than natural images (for example, images of handwritten characters, or images of single isolated objects centered against a white background), other types of normalization might be worth considering, and the best choice may be application dependent. But when training on natural images, using the per-image mean normalization method as given in the equations above would be a reasonable default. |
== References == | == References == | ||
http://cs229.stanford.edu | http://cs229.stanford.edu |