Gray Scale Pixel Values as Features
The first type of feature extraction that we explored was using grayscale pixel values as features. We used the python CV2 library to convert each image into the gray scale and then used PCA and LDA to determine if the feature showed significant distinction between cats and dogs.
Principal Component Analysis (PCA)
PCA is used to reduce the dimensionality of the dataset to find the main contributing features. Dimensionality is reduced by removing features with low variability and only keeping those with the highest variability that contribute the most towards classification decisions. PCA is conducted by first vectorizing each image and then stacking them into a single matrix. The first half of the matrix contains cat images and the second half of the matrix contains dog images. We then perform the PCA fit transform which projects the dataset onto a new bias/new dimension to see if there are significant differences between the classes.