As much we minimize the cost function, regression line for prediction would be more accurate.
Lets start with simplified hypothesis where Θ0 = 0.and h(X)= Θ0 + Θ1 X = Θ1 X .
Minimize this cost function :
Lets start with simplified hypothesis where Θ0 = 0.and h(X)= Θ0 + Θ1 X = Θ1 X .
Minimize this cost function :
h(x) : For fixed value of Θ1 this is function of x.
J( Θ) : Function of parameter Θ1.
We minimizing the cost function for reducing the gap between actual and predicted value. For visualizing it explained it in below figure:
For different value of Θ1, plot the hypothesis value h(x) and cost function J( Θ).
Plot of J(Θ) is shown as :
Calculate the minima of this cost function plot. That value consider as minimize cost function. In above figure minimum cost function value lie between 0 and 1.
No comments:
Post a Comment