Sorry If my question is too naive, I am learning Machine Learning course in that course instructor has taken a linear function
h(x) = theta + theta1(x)
here is an actual data
where x is the input which needs to be given
and y is the actual value and h(x) is a hypothetical value
inorder to reduce the difference between x and h(x) instructor proposed
to square the difference i.e. (h(x)-y)^2
If we consider if its is being solely done to encounter the negative values but It would give me wrong output when I consider the case
h(x) > y, h(x)-y>0 and if we square it (h(x)-y)^2 would be even more isnt it?
Why is it being done, I am unable to understand.
Can somebody shed some light on this?
Thanks a lot in advance
Siddartha C.S
Minimising would find the most negative solution, where as we want the nearest to zero. Alternativly we could take the absolute value of $h(x)-y$.
– Steve Sep 26 '15 at 10:05