QMNIST Feature Reduction
Contents
QMNIST Feature Reduction#
In this project we apply PCA to QMNIST data. Read about Feature Reduction before you start.
Preprocessing#
Task: Use the Python module developed in Load QMNIST to load the first 5000 QMNIST training images.
Solution:
# your solution
Task: Use the above module to apply the following preprocessing steps from Image Processing with NumPy
auto crop,
center in 20x20 image
Solution:
# your solution
Relevant Components#
Task: Perform a full PCA (no feature reduction) and plot standard deviations (square roots of variances) for all principal components.
Solution:
# your solution
Task: Show the data set’s mean and the first 100 principal components as images. Scale principal components by corresponding standard deviation and use same color map for all images.
Solution:
# your solution
Task: Transform all images by PCA with 15 components. For one images plot original and transformed image side by side (you may use PCA.inverse_transform
or implement calculations manually).
Solution:
# your solution
Visualization#
We may use feature reduction techniques to visualize high-dimensional data sets.
Task: Use PCA to reduce the data set to 3 features. Plot the now 3d data set. Color classes differently.
# your solution
Task: Use PCA to reduce the data set to 4 features. Make pair plots for combinations of two features (use same coloring as above).
# your solution