请稍等 ...
×

采纳答案成功!

向帮助你的同学说点啥吧!感谢那些助人为乐的人

SKLearn中的svc with linear kernel和LinearSVC是一回事吗?

正在回答

插入代码

1回答

原理是一样的。最优化的目标是一样的。但是SVM背后是一个很复杂的最优化问题,所以在具体求解这个最优化问题的算法上,有很大的不同,导致结果是有出入的。


如果你查看sklearn中LinearSVC的文档,会看到这样一个描述,来说明LinearSVC和SVC kernel='linear'的不同:)

//img1.sycdn.imooc.com//szimg/5cc725c50001281b08240343.jpg

Similar to SVC with parameter kernel=’linear’, but implemented in terms of liblinear rather than libsvm, so it has more flexibility in the choice of penalties and loss functions and should scale better to large numbers of samples.


也可以参考这里:https://coding.imooc.com/learn/questiondetail/108751.html


继续加油!:)

0 回复 有任何疑惑可以回复我~
  • 提问者 慕桂英雄 #1
    非常感谢!
    回复 有任何疑惑可以回复我~ 2019-05-01 10:22:52
问题已解决,确定采纳
还有疑问,暂不采纳
意见反馈 帮助中心 APP下载
官方微信