Visualizing a 784 dimensional dataset(MNIST) in 2d using PCA
- Seaborn
- Matplotlib
- Scipy
- Scikit-learn
- Numpy
- Standardize The Data
- Compute the co-variance Matrix of it
- Compute the Eigen Values and Their Corresponding Eigen Vectors
- Take the top two maximum eigen values and their corresponding eigen vectors
- Project the standardized data on the plane formed by two principal eigen vectors by vector-vector multiplication.
- Append the labels to the 2D projected data
- Create a new dataframe for plotting our labeled points
- Plot the data on a 2D plane with x being the 1st principal and y being the 2nd principal and hue=label
- Download the MNIST data from https://www.kaggle.com/c/digit-recognizer
- Copy the train.csv file
- Paste it in the same folder where the jupyter notebook exists
- Open the jupyter notebook and run code