I only need help with Parts B and C.
Problem 3) [Python] MNIST dataset
The MNIST dataset is divided into two sets: training and test. Each set comprises a series of images (28 x 28-pixel images of handwritten digits) and their respective labels (values from 0 to 9, representing which digit the image corresponds to). Use the mnist function in the keras datasets to split the MNIST dataset into the training and testing sets. Print the following: The number of images in each training and testing set, and the image width and height.
6) Write a function (with images of ten digits and labels as the input) that plots a figure with 10 subplots for each 0-9 digit. Each subplot has the number of the handwritten digit in the title. Create a loop to call the plot function in (b) with images from each set to create three figures. Note: the code has to select the images randomly. Include all the 10 digits in each figure. Show the results of your code.
In machine learning: We usually divide the training set into two sets of training and validation sets to adjust a machine learning model's parameters. In your code, randomly select 20% of the training images and their corresponding labels and name them as X_valid and y_valid, respectively. Name the remaining training images and their labels as X_train and y_train, respectively. Print the number of images in each training and validation set. Note that there are no overlaps between the two sets.