What is Cost Function?
Cost Function
To break it apart, it is where is the mean of the squares of , or the difference between the predicted value and the actual value.
This function is otherwise called the "Squared error function", or "Mean squared error". The mean is halved as a convenience for the computation of the gradient descent, the derivative term of the square function will cancel out the term. The following image summarizes what the cost function does:
Watch Video:
Subscribe to the channel and like the video.
Formula
In this video we'll define a thing called the cost function, this will let us figure out how to fit the formal possible straight line to our data.
Linear Progression:
In linear progression, we have a training set that I showed then flash back on note M was the number of training exemplifications, so perhaps m equals 47. And the form of our thesis, which we use to make prognostications is this linear function.
To introduce a bit more language, these theta zero and theta one stabilize what I call the model's parameters. And what we are going to do in this video is talk about how to go about choosing these two parameter values, theta 0 and theta 1. With different choices of the parameters theta 0 and theta 1, we get a different thesis and different thesis functions.
So direct regression, what we are going to do is, I am going to want to break a minimization problem. So I will write minimize over theta0 theta1. So, this cost function is also called the squared error function. When occasionally called the squared error cost function and it turns out that why we take the places of the errors.
Conclusion:
Other cost functions will work enough well. But the square cost function is presumably the most generally used one for regression problems.
Latterly in this class, we'll talk about indispensable cost functions as well, but this choice that we just had should be enough reasonable thing to try for utmost linear regression problems.