logistic regression svm hinge loss

二类分类器svm 的loss function 是 hinge loss:L(y)=max(0,1-t*y),t=+1 or -1,是标签属性. 对线性svm,y=w*x+b,其中w为权重,b为偏置项,在实际优化中,w,b是待优化的未知,通过优化损失函数,使得loss function最小,得到优化接w,b。

对于logistic regression 其loss function是L = -\sum_{({\hat {\bf x}},{\hat y})} \log p({\hat y}|{\hat {\bf x}}),由于y=1/(1+e^(-t)),则L=sum(y(log(h))+(1-y)log(1-h))

 

posted @ 2014-09-15 12:47  caoeryingzi  阅读(799)  评论(0编辑  收藏  举报