Credits. This material was created by Fabian Pedregosa for a lecture in Berkeley's EECS 127 / 227AT class. Source code can be found here. The template and the visualizations are modified from the distill article How momentum really works. Some parts of the introduction and the software examples are based on the scipy lecture notes.