Logistic Regression

Posted bloglxc

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Logistic Regression相关的知识,希望对你有一定的参考价值。

使hypotheses hθ(x) to satisfy 0hθ(x)1.

 

z > 0,g(z) > 0.5 ,y=1;

z< 0,g(z) < 0.5 ,y=0;

Cost Function:

When y = 1, we get the following plot for J(θ) vs hθ(x):

 

Similarly, when y = 0, we get the following plot for J(θ) vs hθ(x):

Cost(hθ(x),y) = 0 if hθ(x) = y;

Cost(hθ(x),y) ->∞ if y = 0 and hθ(x) ->1 或


者y



= 1 and hθ(x) ->0.

Simplified Cost Function:

 Cost(hθ(x),y)=ylog(hθ(x))(1y)log(1hθ(x))
y = 1 时,Cost(hθ(x),y) = log(hθ(x));

y = 0时, Cost(hθ(x),y) = -log(1hθ(x))

Gradient Descent

向量化:θ:=θ−(α/m) XT(g(Xθ)y⃗ )

以上是关于Logistic Regression的主要内容,如果未能解决你的问题,请参考以下文章

logistic回归的介绍

probit回归与logistic回归有啥区别

[机器学习实战-Logistic回归]使用Logistic回归预测各种实例

R构建Logistic回归实战(Logistic Regression)

如何用matlab求解logistic模型

logistic分类