The Gradient of Mean Squared Error — Topic 78 of Machine Learning Foundations

Опубликовано: 30 Март 2026
на канале: Jon Krohn
17,876
313

#MLFoundations #Calculus #MachineLearning

In this video, we first derive by hand the gradient of mean squared error (a popular cost function in machine learning, e.g., for stochastic gradient descent. Secondly, we use the Python library PyTorch to confirm that our manual derivations correspond to those calculated with automatic differentiation. Thirdly and finally, we use PyTorch to visualize gradient descent in action over rounds of training.

There are eight subjects covered comprehensively in the ML Foundations series and this video is from the fourth subject, "Calculus II: Partial Derivatives & Integrals". More detail about the series and all of the associated open-source code is available at github.com/jonkrohn/ML-foundations

The playlist for the Calculus subjects is here:    • Calculus for Machine Learning  

Jon Krohn is Chief Data Scientist at the machine learning company Nebula. He authored the book Deep Learning Illustrated, an instant #1 bestseller that was translated into six languages. Jon is renowned for his compelling lectures, which he offers in-person at Columbia University, New York University, and leading industry conferences, as well as online via O'Reilly, his YouTube channel, and the SuperDataScience podcast.

More courses and content from Jon can be found at jonkrohn.com.