Короче говоря, из-за частной производной и применения правила цепочки.
Для тета 0, когда вы берете производную функции потерь (MSE) по отношению к тета 0 (или бета 0 / перехват), Ваша производная находится в форме, показанной справа от eq1.
imagine...
Y = Mx + C
M = Theta 1
C = Theta 0
Loss Function = (Y - (Mx + C))^2
The derivative is in the form of f(x) * f'(x) if that makes sense. f'(x) in Theta 0 is 1 (watch the video to understand the derivate). So
2(Y - (Mx + C)) * derivative of with respect to C of (Y - (Mx + C))
= 2(Y - (Mx + C)) [disregard the 2 in front]
For Theta 1, when you take derivative of the loss function (MSE) with respect to Theta 1 (Or Beta 1 / slope ), your derivative is in the form shown the rightmost of eq1. In this case f'(x) is x, because.....
2(Y - (Mx + C)) * derivative of with respect to M of (Y - (Mx + C))
= 2(Y - (Mx + C)) * (1*x) [because the only term that is left is dx(Mx)]
Вот видео, которое может помочь https://www.youtube.com/watch?v=sDv4f4s2SB8