h θ ( x ) = g ( θ T x ) = 1 1 + e − θ T x g ( z ) = 1 1 + e − z h_{\theta}(x)=g(\theta ^Tx)=\frac{1}{1+e^{-\theta ^Tx}} \\ g(z)=\frac{1}{1+e^{-z}} hθ(x)=g(θTx)=1+e−θTx1g(z)=1+e−z1
对数似然损失
c o s t ( h θ ( x ) , y ) = ∑ i = 1 m − y i l o g ( h θ ( x ) ) − ( 1 − y i ) l o g ( 1 − h θ ( x ) ) cost(h_{\theta}(x),y)=\sum_{i=1}^{m}-y_i log(h_{\theta}(x))-(1-y_i)log(1-h_{\theta}(x)) cost(hθ(x),y)=i=1∑m−yilog(hθ(x))−(1−yi)log(1−hθ(x))