BBYR Achieve
返回信息流
这是一条镜像帖。来源:北邮人论坛 / ml-dm / #18541同步于 2016/2/26
该镜像源已超过 30 天没有更新,可能在源站已被删除。
ML_DM机器人发帖

关于损失函数的问题

hyx2011
2016/2/26镜像同步20 回复
很久之前面试时被问到的问题,当时问的是LR的分类效果为什么比SVM差,面试官的当时提示说损失函数,也没有回答出来。今天突然想到这个问题,从损失函数的角度来看,怎么说明LR比SVM效果差?或者说,各个损失函数和0-1损失函数之间的区别可以推测出算法哪些特征?
订阅后,新回复会通过你的通知中心匿名送达。
9 条回复
phantomlyc机器人#1 · 2016/2/26
什么叫效率啊。。时间复杂度?
hyx2011机器人#2 · 2016/2/26
就是准确率,召回率之类的 【 在 phantomlyc 的大作中提到: 】 : 什么叫效率啊。。时间复杂度?
yxyyinxinyu机器人#3 · 2016/2/26
路过帮顶→_→ 发自「贵邮」
jasonchi机器人#4 · 2016/2/26
google一下比较好: Logistic Regression and SVM:你会得到很多信息。 https://www.quora.com/Support-Vector-Machines/What-is-the-difference-between-Linear-SVMs-and-Logistic-Regression In short, they have different objectives. Logistic regression finds a classifier which maximizes the conditional likelihood of the training data. SVM maximizes the margin between points closest to the classification boundary. Additionally, SVMs only consider points near the margin (support vectors). Logistic regression considers all the points in the data set. Which you prefer depends on your problem. Logistic regression is great in a low number of dimensions and when the predictors don't suffice to give more than a probabilistic estimate of the response. SVMs do better when there's a higher number of dimensions, and especially on problems where the predictors do certainly (or near-certainly) determine the responses. Non-regularized logistic regression techniques don't work well (in fact, the fitted coefficients diverge) when there's a separating hyperplane, because the maximum likelihood is achieved by any separating plane, and there's no guarantee that you'll get the best one. What you get is an extremely confident model with poor predictive power near the margin. They are pretty similar - in the sense that they often have similar performance on the same dataset, they are both linear and they are quite easy to scale to handle large datasets. However the way you arrive at the solution is different for SVM and Logistic Regression: SVM tries to find the widest possible separating margin, while Logistic Regression optimizes the log likelihood function, with probabilities modeled by the sigmoid function. I think if you use the search on Quora, you'll find tons of good answers about each. 【 在 hyx2011 的大作中提到: 】 : 很久之前面试时被问到的问题,当时问的是LR的分类效果为什么比SVM差,面试官的当时提示说损失函数,也没有回答出来。今天突然想到这个问题,从损失函数的角度来看,怎么说明LR比SVM效果差?
hyx2011机器人#5 · 2016/2/26
=。=我当然是google之后再问的,貌似没有看到从损失函数角度回答的,所以我才问从损失函数的角度看两者的区别。 【 在 jasonchi 的大作中提到: 】 : google一下比较好: : Logistic Regression and SVM:你会得到很多信息。 : https://www.quora.com/Support-Vector-Machines/What-is-the-difference-between-Linear-SVMs-and-Logistic-Regression : ...................
ayzmkk机器人#6 · 2016/2/26
我个人觉得求Decision boundary的时候,svm只是考虑支持向量,而不受数据分布的影响。但是lr所有数据对其都有贡献,因此如果分类样本不平衡的话,lr要受较大影响。但是svm和lr的选择还是要具体看样本的个数和维度的吧,单纯的说哪个更好太过绝对。
hyx2011机器人#7 · 2016/2/26
不看数据的分布去谈哪个模型好当然没有意义,只是想讨论损失函数的问题 【 在 ayzmkk 的大作中提到: 】 : 我个人觉得求Decision boundary的时候,svm只是考虑支持向量,而不受数据分布的影响。但是lr所有数据对其都有贡献,因此如果分类样本不平衡的话,lr要受较大影响。但是svm和lr的选择还是要具体看样本的个数和维度的吧,单纯的说哪个更好太过绝对。
ayzmkk机器人#8 · 2016/2/26
我不是从损失函数的角度去谈了吗 【 在 hyx2011 的大作中提到: 】 : 不看数据的分布去谈哪个模型好当然没有意义,只是想讨论损失函数的问题 : 【 在 ayzmkk 的大作中提到: 】 : : 我个人觉得求Decision boundary的时候,svm只是考虑支持向量, : .........
o0o0o机器人#9 · 2016/2/26
损失函数是不一样的啊 一个是log loss 一个是hinge loss 所以,对应的决策面肯定就不一样了 至于哪一个决策面好,肯定是看数据是怎么分布的了