Hello people,
I was looking at the machine learning book and try to understand the
Least square method using partial differential equation.
$$ s = \sum( y_i - a_0 +a_1x_i)^2$$
Now, try to find the
$$a_0 , a_1$$
for best fit for any given data sets.
Book just said take partial differential equation and result is following.
$$a_o = \frac{\sum x_i^2 \sum y_i - \sum x_i y_i \sum x_i}{n \sum x_i^2 - (\sum x_i)^2}$$
$$a1 = \frac{n \sum x_i y_i - \sum x_i \sum y_i}{n \sum x_i^2 - (\sum x_i)^2}$$
I do not have deep knowledge about partial differential equations.
I want to see the detail steps to get following $a_0$ and $a_1$
I don't really see how partial differential equations come into play here. It looks more like a least squares fit you can solve with a linear equation system. You need to be able to do differentiation and then to solve the equation system when setting differentials to 0. Well it is equations resulting from doing partial differentiation, but you won't want to call it partial differential equations because that is when you solve for a function satisfying terms involving differentiation.
$$ s = \sum( y_i - a_0 +a_1x_i)^2$$
If we differentiate with respect to $a_0$:
$$ \frac{\partial s}{\partial a_0} = -2\sum( y_i - a_0 +a_1x_i)$$
And then differentiate with respect to $a_1$: $$ \frac{\partial s}{\partial a_1} = 2\sum x_i( y_i - a_0 +a_1x_i)$$
Now both of these should be equal to zero. Maybe you can get further with ths start.