Cost Function :-A cost function is plotted based on the following equation,
yi - Actual value on iᵗʰ input.
It is basically the average(mean) of differences between squares of hypothesis value and actual values. As the value of cost function reduces the accuracy will be better.
So we will be trying to keep J(θ₁,θ၀) minimum. (0 in ideal case).
The cost function plot will be a 3D figure with,
θ၀ - x axis
θ₁ - y axis
J(θ₁,θ၀) - z axis
The graph will look like a set of concave dips and the minimum height of the graph will provide best value of θ₁ and θ၀.
For convenience, we are skipping θ၀ for now and plots θ₁ vs J(θ₁)
On Next - Gradient Descent