Professional Documents
Culture Documents
In the "Normal Equation" method, we will minimize J by explicitly taking its derivatives with
respect to the θj s and setting them to zero. This allows us to find the optimum theta without
iteration.
∂ J ( w) T T
=−2 X y +2 X Xw set ¿ 0
∂w
T T
−2 X y +2 X Xw =0
T T
−X y+ X Xw =0
T T
X Xw= X y
−1 T
w=( X T X ) X y