training

Before a supervised model can make predictions, it must be trained. To train a model, we give the model a dataset with labeled examples. The model’s goal is to work out the best solution for predicting the labels from the features. The model finds the best solution by comparing its predicted value to the label’s actual value. Based on the difference between the predicted and actual values—defined as the loss—the model gradually updates its solution. In other words, the model learns the mathematical relationship between the features and the label so that it can make the best predictions on unseen data.