Answer To: Assignment - Dimensionality Reduction (assignment.ipynb) This assignment is based on content...
Neha answered on Jul 08 2021
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Assignment 3 - Dimensionality Reduction"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"This assignment is based on content discussed in module 6 and will work with the famous MNIST dataset, which is a set of images of handwritten digits https://en.wikipedia.org/wiki/MNIST_database.\n",
"The dataset has been provided to you in a .csv file."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Learning outcomes"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"- Apply a Random Forest classification algorithm to MNIST dataset\n",
"- Perform dimensionality reduction of features using PCA and compare classification on the reduced dataset to that of original one\n",
"- Apply dimensionality reduction techniques: t-SNE and LLE"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Questions (15 points total)\n",
"\n",
"__Question 1 (1 point).__ Load the MNIST dataset and split it into a training set and a test set (take the first 60,000 instances for training, and the remaining 10,000 for testing)."
]
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"outputs": [],
"source": [
"# YOUR CODE HERE\n",
"import numpy as np\n",
"import pandas as pd\n",
"import matplotlib.pyplot as plt\n",
"%matplotlib inline\n",
"from sklearn.ensemble import...