In this tutorial, the speaker explains the fundamentals of supervised machine learning. He describes how a model learns from data rather than being explicitly programmed, starting with random predictions and iteratively improving them. The process involves exposing the model to training data and target labels, computing the error between predictions and targets using a loss function (e.g., mean squared error for regression, cross‑entropy for classification), and then adjusting model parameters via an optimization algorithm. The most common optimizer, stochastic gradient descent, is introduced alongside more advanced methods such as Adam and RMSProp. This cycle of prediction, loss calculation, and parameter update repeats over the dataset until the model achieves satisfactory performance.
Chapters
Have you ever asked yourself how a machine learns? In machine learning, the model learns from data. In other words, it hasn't been programmed explicitly, as is the case with conventional applications and software. The only thing we program into a model is the learning method. Then we let it manage on its own, learning to perfect itself as it's exposed to the training data. Taking supervised learning as an example, when the model is trained, it's exposed to training data and expected targets. Obviously, at the beginning of the process, the model makes completely random predictions that are very often far from the expected values. Fortunately, the learning algorithm is there to guide the model towards an optimized state where predictions are close to the required values. So each time the model sees all the training data, it produces a prediction. This is compared to the expected value to calculate the error. The function that measures this error is called the loss function. There are many algorithms that implement the loss function, such as mean squared error for regression problems, or cross-entropy for classification tasks. Next, the model parameters need to be adjusted. In other words, the model settings need to be modified so that it produces a better prediction next time, thereby reducing the error calculated by the loss function. To do this, the model invokes the optimization or minimization function. The optimization function changes the model's parameters in order to steer it as quickly as possible towards an optimized state. The most famous optimization function is stochastic gradient descent. However, there are more advanced functions such as Adam optimizer, RMSProp, etc. The calculation of the error using the loss function and the application of the optimization function are carried out in a repetitive way, reviewing all or part of the dataset at each iteration until the model produces satisfying predictions.