1. Learn
  2. /
  3. Courses
  4. /
  5. Linear Classifiers in Python

Connected

Exercise

Comparing the logistic and hinge losses

In this exercise you'll create a plot of the logistic and hinge losses using their mathematical expressions, which are provided to you.

The loss function diagram from the video is shown on the right.

Instructions

100 XP
  • Evaluate the log_loss() and hinge_loss() functions at the grid points so that they are plotted.