Cost function
Introduction
In machine learning, a cost function is a function that is used to optimize a model's parameters by minimizing the error between the predicted output and the actual output. The cost function is used in training a machine learning model to find the set of parameters that minimizes the error between the predicted output and the actual output. The cost function is typically defined as a function of the model's parameters and the training data, and it is used to guide the optimization process by providing a measure of how well the model is doing on the training data.
A fairly decent video