Plot the Data Points
Explore how to split comma-separated values from the MNIST dataset, convert them into numerical arrays, reshape to 28 by 28 format, and plot these points using Python's imshow function. Understand the process of visualizing handwritten digits to verify data representation.
We'll cover the following...
We'll cover the following...
Code to plot data points
We saw earlier how we might plot a rectangular array of numbers using the imshow() function. We want to do the same here, but we need to convert that list of comma-separated numbers into a suitable array. Here are the steps to do that:
-
Split that long text string of comma-separated values into individual values, using the commas as the place to do the splitting.
-
Ignore the first value and the label, and take the remaining list of ...