Project- Predicting Noisy Images using KNN Classifier

3 / 10

Predicting Noisy Images - Define the Function to Show Images

In this step, we will define a function named showImage() that will help us view the images in the dataset.

INSTRUCTIONS

Define the showImage() function:

def << your code goes here >>(data):
    some_article = data   # Selecting the image.
    some_article_image = some_article.reshape(28, 28)
    plt.imshow(some_article_image, cmap = matplotlib.cm.binary, interpolation="nearest")
    plt.axis("off")
    plt.show()
Get Hint See Answer


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

Loading comments...