首页 > 代码库 > Logistic Regression
Logistic Regression
使hypotheses hθ(x) to satisfy 0≤hθ(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))?(1?y)log(1?hθ(x))
y = 1 时,Cost(hθ(x),y) = ?log(hθ(x));
y = 0时, Cost(hθ(x),y) = -log(1?hθ(x));
Gradient Descent
向量化:θ:=θ?(α/m) XT(g(Xθ)?y? )
Logistic Regression
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。