机器学习入门(八)之----logistic回归(番外篇感知机算法)
岁月难得沉默,
夕阳挂在墙头舍不得我。
感知机算法
如果我们限制取值在$ [0,1]$ 之间的函数采取如下形式,
\[\begin{equation}
g(z)=\left\{
\begin{array}{ll}{1} & {\text { if } z \geq 0} \\
{0} & {\text { if } z<0}\end{array}
\right.
\end{equation}
\]
并采用相应配套的假设函数和更新公式,
\[\begin{equation}
h_{\theta}(x)=g\left(\theta^{T} x\right)=\frac{1}{1+e^{-\theta^{T} x}}
\end{equation}
\]
\[\begin{equation}
\theta_j :=\theta_j+\alpha \left(y-h_{\theta}(x)\right) x_{j}
\end{equation}
\]
则我们就得到了感知机算法(perceptron learning algorithm)。
尽管更新公式来形式上还是和线性回归和logistic回归相同。但实际上感知机算法和前两者是非常不一样的。首先它没有一个有意义的概率解释,因此也不能用最大似然法概率建模。在学习理论那里还要提这个算法。