简单的线性回归
2018-05-13 本文已影响0人
又大又甜的桂圆
找到a、b使得:
$$
\sum_{i=1}^{m}\left ( y^{\left ( i \right )} -ax^{\left ( i \right )}-b \right )^{2}\Rightarrow J\left ( a,b \right )
$$
尽可能小,即
$$
\begin{cases}
& \frac{\partial J\left ( a,b \right )}{\partial a}= 0 \
& \frac{\partial J\left ( a,b \right )}{\partial b}= 0
\end{cases}
$$