-Cost function
For the training set and our assumptions, we will consider how to determine the coefficients in the assumptions.
What we are going to do now is to choose the right parameters, and the selection of parameters directly affects the accuracy of the resulting straight line for the training set description. The difference between the predicted value and the actual value in the training set is the modeling error (Modeling error).
the cost function is defined by calculating the sum of squares of the modeling errors. Our goal is to minimize the cost function by selecting the parameters.
By drawing contour lines, we can see that there is indeed a point in the three-dimensional space that can make the cost function least.
The process of minimizing the value of the cost function by selecting the appropriate parameters is shown:
Coursera Machine Learning Study notes (v)