Exercise

Visualizing easy and difficult examples

In this exercise, you'll visualize the examples that the logistic regression model is most and least confident about by looking at the largest and smallest predicted probabilities.

The handwritten digits dataset is already loaded into the variables X and y. The show_digit function takes in an integer index and plots the corresponding image, with some extra information displayed above the image.

Instructions

100 XP
  • Fill in the first blank with the index of the digit that the model is most confident about.
  • Fill in the second blank with the index of the digit that the model is least confident about.
  • Observe the images: do you agree that the first one is less ambiguous than the second?