The gradient descent:
$\theta_{t+1}=\theta_t-a\frac{\partial}{\partial \theta_j}J(\theta)$
But specifically about $J$ cost function (Mean Squared Error) partial derivative:
Consider that: $h_\theta(x)=\theta_0+\theta_1x$
$\frac{\partial}{\partial\theta_j}J(\theta) = \frac{\partial}{\partial\theta_j}\frac{1}{2}(h_{\theta}(x)-y)^2$
$\ \ \ \ \ \ \ \ \ \ \ \ =2\frac{1}{2}(h_{\theta}(x)-y)*\frac{\partial}{\partial\theta_j}(h_{\theta}(x)-y)$
$\ \ \ \ \ \ \ \ \ \ \ \ = (h_{\theta}(x)-y)*\frac{\partial}{\partial\theta_j}(\sum_{i=0}^{n}\theta_ix_i-y_i)$
$\ \ \ \ \ \ \ \ \ \ \ \ = (h_{\theta}(x)-y)x_j$
It´s not clear to me how $x_j$ is calculated:
$\frac{\partial}{\partial\theta_j}(\sum_{i=0}^{n}\theta_ix_i-y) = x_j $
Can anyone help me to understand in detail this part of the partial derivative? Thanks in advance.