I'm wondering why we multiple by 2 when calculating partial derivatives.
I'm referencing the 2's that I've circled below, from here.
We also see this in the python implementation,
m_deriv += -2*X[i] * (Y[i] - (m*X[i] + b)), there is a 2.
How can I understand the intuition here?
My math is not strong so apologies in advance if this is a silly question.