Friday, May 17, 2013

Minimize the cost function of Regression Method

As much we minimize the cost function, regression line for prediction would be more accurate.

Lets start with simplified hypothesis where Θ= 0.and h(X)= ΘΘ1 X = Θ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