It is just a learning example. The point of the exercise is to show that SGD can be used for approximations of curves.
More complicated shapes can be approximated too, and that is literally what deep learning is about (though every input can only produce one output, so Z shapes can not be approximated and your rollercoaster image wouldn’t work either). However, approximating more complicated shapes requires more complicated functions. How this can be done is described in the follow up lectures.
1 Like