R Tutorial: Exploring the MNIST dataset

Federico Castanedo walks through t-SNE and GLRM, two methods for shrinking high-dimensional data. The MNIST dataset has 70,000 handwritten digit images, each 28×28 pixels (784 features). Dimensionality reduction cuts memory, speeds up training, and reveals patterns visually.
Chapters
Hello, this is Federico Castanedo and I will explain you how to apply advanced dimensionality reduction techniques to solve exciting problems. I got a PhD in artificial intelligence and have many years of data science experience in academia, startups and large corporations. Before we start, please remember this is an advanced course and we expect you have taken the previous course on dimensionality reduction. Let's begin with a brief introduction of the dimensionality reduction techniques that we will learn and then we will explore the MNIST data set. In this course we will learn how to apply two state of the art dimensionality reduction techniques, T SNE and Generalized Low Rank Models. De Distributed Stochastic Neighbor Embedding or T SNE is an algorithm that performs nonlinear dimensionality reduction and we will explore how to use it in predictive models. On the other hand, we will also review glrm, which is a parallelized optimization algorithm that can be used with numerical and categorical variables and allows to impute missing values. Dimensionality reduction techniques are based on unsupervised machine learning algorithms and their application offers several advantages. It provides a way of doing feature selection, it compresses high dimensional data into a few important features, it saves memory and speeds up building machine learning models. It allows the visualization of high dimensional data sets and in the case of glrm, it also imputes missing data. In this course we will learn how to apply these dimensionality reduction techniques to exploit the mentioned advantages using interesting data sets like the mnistic, a credit card fraud dataset from Cabel and the fashion version of MNIST released by Zalando. Before we start reducing data dimensionality, let's have a look at the MNIST dataset. The MNIST dataset is a very well known dataset used to evaluate the performance of machine learning models. It consists of 70,000 images of handwriting digits ranging from 0 to 9. Each image is 28 pixels in height and 28 pixels in width, which makes a total of 784 pixels. Every pixel has a single value associated with it indicating its lineage or darkness which is an integer between 0 and 250 50. In this image you can see an example of the number three. Let's look at some more digit samples. Here you can see more examples of handwriting digits from 0 to 9. It is clear that as humans we have several ways to write each digit and a machine must be able to take all of them into account. As we will see, this is not an easy task. Lets have a look at the first six records and columns. As another example, we are showing the values of pixels 400 to 405 for the first record. Note that we are selecting columns 402 to 407 because the first column is the label and the pixels start at 0. Remember that each pixel is an integer between 0 and 25050 that indicates its linex or darkness. We can expect that same digits will have similar values in each pixel, so one assumption is to compute the pixel statistics of the same digits. For instance, here we show the statistics of digits 1 and and 0 for pixel 408. As you can see, they have extremely different values for that pixel. Let's get started with the mnist dataset and do some data explore.
More from Richie

#359 My Best Friend is AI with Valerie Tiberius, Professor of Philosophy at University of Minnesota

How AI Agents Will Work While You Sleep | Ruslan Salakhutdinov, Professor at Carnegie Mellon

#358 How AI Agents Will Work While You Sleep | Ruslan Salakhutdinov, Professor at Carnegie Mellon







