Wu Enda’s machine learning and memorizing knowledge points linear regression formula

Time:2020-11-8

Regression equation

Wu Enda's machine learning and memorizing knowledge points linear regression formula

Octave code representation
h = X * theta

Cost function

Least mean square (LMS)
Wu Enda's machine learning and memorizing knowledge points linear regression formula

J = 0.5 * m^-1 * (X*theta-y)' * (X*theta-y);

Gradient descent

Wu Enda's machine learning and memorizing knowledge points linear regression formula

theta = theta - alpha * m ^ -1 * X' * (X * theta - y)

Random gradient descent

Wu Enda's machine learning and memorizing knowledge points linear regression formula

Normal equation

Wu Enda's machine learning and memorizing knowledge points linear regression formula

theta=pinv(X'*X)*X'*y