工作原理
Sigmoid 函数
公式:
σ ( t ) = 1 1 + e − t \sigma(t)=\frac{1}{1+e^{-t}} σ(t)=1+e−t1
p ^ = σ ( θ T ⋅ x b ) = 1 1 + e − θ T ⋅ x b \hat{p}=\sigma\left(\theta^{T} \cdot x_{b}\right)=\frac{1}{1+e^{-\theta^{T} \cdot x_{b}}} p^=σ(θT⋅xb)=1+e−θT⋅xb1
y ^ = { 1 , p ^ ≥ 0.5 θ T ⋅ x b ≥ 0 0 , p ^ < 0.5 θ T ⋅ x b < 0 \hat{y}=\left\{\begin{array}{lll} 1, & \hat{p} \geq 0.5 & \theta^{T} \cdot x_{b} \geq 0 \\ 0, & \hat{p}<0.5 & \theta^{T} \cdot x_{b}<0 \end{array}\right. y^={ 1,0,