SVM支持向量机(SMO算法)的R实现

本文档介绍了如何使用R语言实现支持向量机(SVM)的关键算法——SMO。作者首先表达了对现有资源的赞赏,然后分享了自己编写R语言版本SVM的愿望。主要内容包括SMO算法的逻辑引入、详细步骤和R代码实现,以及一个实例验证。文章引用了Platte的文献作为主要参考,并推荐了其他优秀博客以深入理解SVM原理。
摘要由CSDN通过智能技术生成

    最近一段时间想好好把支持向量机学习下,从网上看到有很多讲的很好的博客。对于SVM里面的许多原理都讲的很透彻,确实很是佩服这些大牛,膜拜。

   但是苦恼的一点在于,在网上找不到关于SVM的R语言版本的编程实现,虽说有包的实现,但个人还是喜欢自己通过编程来深入了解SVM,所以这也是我写这篇博客的目的。网上倒有一个Python,但个人对Python是一无所知。这里还是把链接打出来,想要看的朋友自己去看看,写的很详细,很好。http://blog.csdn.net/zouxy09/article/details/17292011;不过听说统计之都的那些大牛们正在编写关于十大算法的R语言实现,真的是非常的期待。也非常感谢统计之都,他们对于R语言的推广做出了很多贡献。

   好了,话不多说,进入正题。我这篇文章主要是基于platte.A Fast Algorithm for Training Support Vector Machines这篇文献写的。主要也就是SVM算法中最关键的SMO算法的R实现。在进入算法之前也还是先热热身,慢慢引入SMO算法步骤粗去,也让这文章不会显得那么突兀。但我也不会去介绍的很详细,想要先要理解原理的你们,推荐先去看看July的博客,写的很棒。http://blog.csdn.net/v_july_v/article/details/7624837;OK,那我们就开始咯。下面的文章主要分为两个部分:  

                             1.大致按逻辑引出支持向量机的公式表达

                             2.详细介绍SMO算法的介绍,主要参考Platte的那篇文献

                             3.关于SMO算法的R

Twenty-five years have passed since the publication of the Russian version of the book Estimation of Dependencies Based on Empirical Data (EDBED for short). Twentyfive years is a long period of time. During these years many things have happened. Looking back, one can see how rapidly life and technology have changed, and how slow and difficult it is to change the theoretical foundation of the technology and its philosophy. I pursued two goals writing this Afterword: to update the technical results presented in EDBED (the easy goal) and to describe a general picture of how the new ideas developed over these years (a much more difficult goal). The picture which I would like to present is a very personal (and therefore very biased) account of the development of one particular branch of science, Empirical Inference Science. Such accounts usually are not included in the content of technical publications. I have followed this rule in all of my previous books. But this time I would like to violate it for the following reasons. First of all, for me EDBED is the important milestone in the development of empirical inference theory and I would like to explain why. Second, during these years, there were a lot of discussions between supporters of the new paradigm (now it is called the VC theory1) and the old one (classical statistics). Being involved in these discussions from the very beginning I feel that it is my obligation to describe the main events. The story related to the book, which I would like to tell, is the story of how it is difficult to overcome existing prejudices (both scientific and social), and how one should be careful when evaluating and interpreting new technical concepts. This story can be split into three parts that reflect three main ideas in the development of empirical inference science: from the pure technical (mathematical) elements of the theory to a new paradigm in the philosophy of generalization. The first part of the story, which describes the main technical concepts behind the new mathematical and philosophical paradigm, can be titled Realism and Instrumentalism: Classical Statistics and VC Theory In this part I try to explain why between 1960 and 1980 a new approach to empirical inference science was developed in contrast to the existing classical statistics approach developed between 1930 and 1960. The second part of the story is devoted to the rational justification of the new ideas of inference developed between 1980 and 2000. It can be titled Falsifiability and Parsimony: VC Dimension and the Number of Entities It describes why the concept of VC falsifiability is more relevant for predictive generalization problems than the classical concept of parsimony that is used both in classical philosophy and statistics. The third part of the story, which started in the 2000s can be titled Noninductive Methods of Inference: Direct Inference Instead of Generalization It deals with the ongoing attempts to construct new predictive methods (direct inference) based on the new philosophy that is relevant to a complex world, in contrast to the existing methods that were developed based on the classical philosophy introduced for a simple world. I wrote this Afterword with my students’ students in mind, those who just began their careers in science. To be successful they should learn something very important that is not easy to find in academic publications. In particular they should see the big picture: what is going on in the development of this science and in closely related branches of science in general (not only about some technical details). They also should know about the existence of very intense paradigm wars. They should understand that the remark of Cicero, “Among all features describing genius the most important is inner professional honesty”, is not about ethics but about an intellectual imperative. They should know that Albert Einstein’s observation about everyday scientific life that “Great spirits have always encountered violent opposition from mediocre minds,” is still true. Knowledge of these things can help them to make the right decisions and avoid the wrong ones. Therefore I wrote a fourth part to this Afterword that can be titled The Big Picture. This, however, is an extremely difficult subject. That is why it is wise to avoid it in technical books, and risky to discuss it commenting on some more or less recent events in the development of the science. Writing this Afterword was a difficult project for me and I was able to complete it in the way that it is written due to the strong support and help of my colleagues Mike Miller, David Waltz, Bernhard Sch¨olkopf, Leon Bottou, and Ilya Muchnik.
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值