Project- Predicting Noisy Images using KNN Classifier

5 / 10

Predicting Noisy Images - Explore the Data

In this step we will explore the dataset.

INSTRUCTIONS
  1. First, we will print the shape of the variables we created in the previous step:

    print(X_train.<< your code goes here >>)
    print(y_train.shape)
    print(<< your code goes here >>.shape)
    print(y_test.shape)
    
  2. Next, we will use the showImage() function we created earlier to view the first image in the training set and it's corresponsing label:

    << your code goes here >>(X_train[0])
    << your code goes here >>[0]
    
  3. Finally, we will view few more images from the dataset:

    plt.figure(figsize=(10,10))
    for i in range(15):
        plt.subplot(5,5,i+1)
        plt.xticks([])
        plt.yticks([])
        array_image = X_train[i].reshape(28, 28)
        plt.imshow(array_image, cmap = matplotlib.cm.binary, interpolation="nearest")
    plt.show()
    
See Answer

No hints are availble for this assesment


Note - Having trouble with the assessment engine? Follow the steps listed here

Loading comments...