高人对libsvm的经典总结(全面至极)


http://www.ilovematlab.cn/viewthread.php?tid=74019&sid=vYpSs5

SVM相关资源汇总[matlab-libsvm-class-regress](by faruto)

SVM相关资源汇总[matlab-libsvm-class-regress](by faruto)

                                                          ----关于SVM的那点破事 

by faruto

   可以了,终于可以完结了!这帖子我编辑过n次,不断的往里面添加东西,我想今晚可能是我最后一次编辑这个帖子.在这个帖子里面您可以找到如下和SVM相关的东西.

1.关于SVM的工具箱-libsvm-mat

    (1)本帖子中的所有资源所使用的SVM的工具箱是libsvm-mat,没有使用其他的SVM工具箱,我坚信把这一个SVM的工具箱研究的透彻就够了,反正我是够用了!

 (2)关于libsvm-mat的安装的问题,你可以看下面的Q&A,也可以下载相应的我制作的SVM的视频

 (3)关于libsvm-mat工具箱本身的使用问题,几乎所有的疑问你都可以找到答案~

 (4)关于libsvm-mat版本更新的问题,林智仁官方的最新版本是:libsvm-mat-2.89-3,在下面你可以找到下载的链接,官方网页上的链接有问题,我是向林直接要的.还有一个faruto版本的libsvm,最新的是[farutoFinalVersion],我在里面加进了各种SVM参数优化的子函数,方便使用.在下面亦有下载链接.

2.关于SVM的理论相关的.

在下面提供了一些资源和paper, ppt,pdf,虽然这几个资源是有限的,但我敢说足够了.原因有两个:a.下面的几个文献本身质量就很高.b.这些文献主要的SVM的参考文献已经几乎全部列出了,你可以寻径查找.

3.关于......

====================================================================

几乎 (almost everyone)关于你想问的有关libsvm的所有问题在这个帖子中都有答案.

so请详细阅读此帖子后.若你的问题找不到答案,再发帖~

libsvm-mat-2.89-3-[farutoFinalVersion]

libsvm-mat-2.89-3-[farutoUltimateVersion2.0]

farutoUltimateVersion2.0就是最后的版本号了。我不会再更新啦~大家就下载这个版本的就可以啦。虽说近期也有一些更新和优化,但整体都是在这个的基础上啦。

====================另 libsvm-mat-farutoversion 版本更新历史[版本号有点乱大家别介意.O(∩_∩)O]:

farutoUltimateVersion1.0:2009.10.28

http://www.ilovematlab.cn/viewthread.php?tid=54665&highlight=+faruto

libsvm-mat-2.89-3-[farutoFinalVersion+pca]:2009.10.28

http://www.ilovematlab.cn/viewthread.php?tid=54658&highlight=+faruto

libsvm-mat-2.89-3-[farutoFinalVersion]:2009.10.08

http://www.ilovematlab.cn/viewthread.php?tid=52388&highlight=+faruto

libsvm-mat-2.89-3-farutoVer2:2009.09.23

http://www.ilovematlab.cn/viewthread.php?tid=51166&highlight=+faruto

libsvm-mat-2.89-3-farutoVer1:2009.08.27

http://www.ilovematlab.cn/viewthread.php?tid=48175&highlight=+faruto

============

欢迎您购买 《MATLAB 神经网络30个案例分析》(我是作者之一)

SVM是该书的内容之一

购买方式:http://www.ilovematlab.cn/thread-47939-1-1.html

MATLAB 神经网络30个案例分析——目录

http://www.ilovematlab.cn/thread-59023-1-1.html

与该书配套的有该加强工具箱的详细的使用视频:

SVM讲解视频汇总[by faruto]http://www.ilovematlab.cn/thread-62252-1-1.html

================

关于SVM[libsvm]的常见问题整理[Q&A]

强烈建议您再发有关libsvm的问题前,看一下Q&A大多数的问题您在那里就会找到答案~~O(∩_∩)O

==============

==========SVM入门精品讲解系列 十连弹=============

SVM入门精品讲解系列之一

SVM入门精品讲解系列之二&之三

SVM入门精品讲解系列之四

SVM入门精品讲解系列之五&六

SVM入门精品讲解系列之七

SVM入门精品讲解系列之八

SVM入门精品讲解系列之九&十

==========SVM视频===============================

【视频】神经网络libsvm-mat-加强工具箱介绍, 最好的SVM教程

http://www.ilovematlab.cn/thread-59483-1-1.html

Matlab 神经网络(八.1):SVM神经网络理论实际应用

Matlab 神经网络(八.2):SVM神经网络理论理论分析

=========SVM其他相关链接=========================

关于libsvm分类结果的可视化及分类曲线的可视化

Binary-class Cross Validation with Different Criteria

利用GA优化SVM参数的一点小探索

libsvm-mat-2.89-3-[farutoFinalVersion+pca]

利用PSO优化SVM参数的一点小探索

Matlab的libsvm-mat faruto版本 Ver2

Matlab利用libsvm做回归分析的一个小例子-by faruto

关于SVM参数c&g选取的总结帖[matlab-libsvm]

Matlab的FIG(信息粒化)+SVM对于上证指数的预测

libsvm的最新版本----libsvm-mat-2.89-3

libsvm更新版本----faruto version

有关Matlab中的SVM的一些问题的讨论[一次邮件往来]

有关SVM和libsvm的非常好的资料,想要详细研究SVM看这个

SVM的多类问题

交叉验证(Cross Validation)方法思想简介

关于libsvm分类结果的可视化及分类曲线的可视化

[framework] libsvmfarutoUltimateVersion3.0]

再论Matlab的libsvm的安装

如何利用LIBSVM-MAT画ROC曲线?

再议归一化问题

=================================================

SVM工具箱快速入手简易教程(by faruto)

最近发现好多朋友有关SVM的工具箱的使用方法相关的东西,其实帮助文件里都有的[无论是matlab自带的还是libsvm都是有帮助文件的而且写的也明确,但还是有朋友问问],无奈我就写一个小简易的上手的教程,事先声明只给菜鸟写的,高手就不要看了,其实帮助文件里都有,你也可以看帮助文件,不用看我的.O(∩_∩)O..

一. matlab 自带的函数(matlab帮助文件里的例子)[只有较新版本的matlab中有这两个SVM的函数]

=====

svmtrain svmclassify

=====简要语法规则====

svmtrain

Train support vector machine classifier

Syntax

SVMStruct = svmtrain(Training, Group)

SVMStruct = svmtrain(..., 'Kernel_Function', Kernel_FunctionValue, ...)

SVMStruct = svmtrain(..., 'RBF_Sigma', RBFSigmaValue, ...)

SVMStruct = svmtrain(..., 'Polyorder', PolyorderValue, ...)

SVMStruct = svmtrain(..., 'Mlp_Params', Mlp_ParamsValue, ...)

SVMStruct = svmtrain(..., 'Method', MethodValue, ...)

SVMStruct = svmtrain(..., 'QuadProg_Opts', QuadProg_OptsValue, ...)

SVMStruct = svmtrain(..., 'SMO_Opts', SMO_OptsValue, ...)

SVMStruct = svmtrain(..., 'BoxConstraint', BoxConstraintValue, ...)

SVMStruct = svmtrain(..., 'Autoscale', AutoscaleValue, ...)

SVMStruct = svmtrain(..., 'Showplot', ShowplotValue, ...)

---------------------

svmclassify

Classify data using support vector machine

Syntax

Group = svmclassify(SVMStruct, Sample)

Group = svmclassify(SVMStruct, Sample, 'Showplot', ShowplotValue)

============================实例研究====================

load fisheriris

%载入matlab自带的数据[有关数据的信息可以自己到UCI查找,这是UCI的经典数据之一],得到的数据如下图:

tu1

[attach]24862[/attach]

其中meas是150*4的矩阵代表着有150个样本每个样本有4个属性描述,species代表着这150个样本的分类.

data = [meas(:,1), meas(:,2)];

%在这里只取meas的第一列和第二列,即只选取前两个属性.

groups = ismember(species,'setosa');

%由于species分类中是有三个分类:setosa,versicolor,virginica,为了使问题简单,我们将其变为二分类问题:Setosa and non-Setosa.

[train, test] = crossvalind('holdOut',groups);

cp = classperf(groups);

%随机选择训练集合测试集[有关crossvalind的使用请自己help一下]

其中cp作用是后来用来评价分类器的.

svmStruct = svmtrain(data(train,:),groups(train),'showplot',true);

%使用svmtrain进行训练,得到训练后的结构svmStruct,在预测时使用.

训练结果如图:

tu2

[attach]24863[/attach]

classes = svmclassify(svmStruct,data(test,:),'showplot',true);

%对于未知的测试集进行分类预测,结果如图:

tu3

[attach]24864[/attach]

classperf(cp,classes,test);

cp.CorrectRate

ans =

    0.9867

%分类器效果测评,就是看测试集分类的准确率的高低.

二.台湾林智仁的libsvm工具箱

该工具箱下载[libsvm-mat-2.86-1]:[attach]24867[/attach]

安装方法也很简单,解压文件,把当前工作目录调整到libsvm所在的文件夹下,再在set path里将libsvm所在的文件夹加到里面.然后

在命令行里输入

mex -setup  %选择一下编译器

make 

这样就可以了.

建议大家使用libsvm工具箱,这个更好用一些.可以进行分类[多类别],预测....

=========

svmtrain

svmpredict

================

简要语法:

Usage

=====

matlab> model = svmtrain(training_label_vector, training_instance_matrix [, 'libsvm_options']);

        -training_label_vector:

            An m by 1 vector of training labels (type must be double).

        -training_instance_matrix:

            An m by n matrix of m training instances with n features.

            It can be dense or sparse (type must be double).

        -libsvm_options:

            A string of training options in the same format as that of LIBSVM.

matlab> [predicted_label, accuracy, decision_values/prob_estimates] = svmpredict(testing_label_vector, testing_instance_matrix, model [, 'libsvm_options']);

        -testing_label_vector:

            An m by 1 vector of prediction labels. If labels of test

            data are unknown, simply use any random values. (type must be double)

        -testing_instance_matrix:

            An m by n matrix of m testing instances with n features.

            It can be dense or sparse. (type must be double)

        -model:

            The output of svmtrain.

        -libsvm_options:

            A string of testing options in the same format as that of LIBSVM.

Returned Model Structure

========================

实例研究:

load heart_scale.mat

%工具箱里自带的数据

如图:

tu4

[attach]24873[/attach]

其中 heart_scale_inst是样本,heart_scale_label是样本标签

model = svmtrain(heart_scale_label, heart_scale_inst, '-c 1 -g 0.07');

%训练样本,具体参数的调整请看帮助文件

[predict_label, accuracy, dec_values] = svmpredict(heart_scale_label, heart_scale_inst, model);

%分类预测,这里把训练集当作测试集,验证效果如下:

>> [predict_label, accuracy, dec_values] = svmpredict(heart_scale_label, heart_scale_inst, model); % test the training data

Accuracy = 86.6667% (234/270) (classification)

==============

这回把SVM这点入门的东西都说完了,大家可以参照着上手了,有关SVM的原理我下面有个简易的PPT,是以前做项目时我做的[当时我负责有关SVM这一块代码实现讲解什么的],感兴趣的你可以看看,都是上手较快的东西,想要深入学习SVM,你的学习统计学习理论什么的....挺多的呢..

[attach]24876[/attach]

-----------有关SVM和libsvm的非常好的资料,想要详细研究SVM看这个------

[attach]32035[/attach]

[attach]32036[/attach]

[attach]32037[/attach]

[attach]32038[/attach]

其中那个林智仁06年机器学习暑期学校讲义pdf是 matlab@man提供的[http://www.ilovematlab.cn/thread-47506-1-1.html]

图:

[attach]32039[/attach]

[attach]32040[/attach]

[attach]32041[/attach]

[attach]32042[/attach]

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值