Here are the images from my code.


Matlab Code

The hinge loss results are more smooth and increase linearly with distance from optimal. It is hard to see in the heatmaps since they don’t have very good color resolution (I’m new to matlab and don’t really know how to alter the heatmap for better color detail). I also noticed that with the 0-1 loss, the further from 0,0 w gets the loss gets minimized, whereas the hingeloss does not suffer in the same way.