matlab_SVM 视频讲解_1_

更新时间:2023-09-02 10:26:01 阅读量: 教育文库 文档下载

说明:文章内容仅供预览,部分内容可能不全。下载后的文档,内容与下面显示的完全一致。下载之前请确认下面内容是否您想要的,是否完整无缺。

视频名称:SVM Matlab工具箱分类实例应用及理论介绍 主讲人:faruto(Matlab中文论坛人工智能版主)

QQ:516667408 Email:farutoliyang@http://www.77cn.com.cn http://www.77cn.com.cn/faruto @http://www.77cn.com.cn@ 2009.8.12

版权申明:视频归原创作者跟Matlab中文论坛所有,可以在Matlab中文论坛下载或者观看,请勿转载!http://www.77cn.com.cn ! Matlab&Simulink为美国mathworks公司注册商标!版权归mathworks公司所有!

http://www.77cn.com.cn

SVM Matlab工具箱分类实例应用及理论介绍 faruto

视频名称:SVM Matlab工具箱分类实例应用及理论介绍 主讲人:faruto(Matlab中文论坛人工智能版主)

总体目录: 1.实践(matlab_svm_1.wmv) a. what is SVM? b. libsvm-mat的安装及使用初步介绍 c. 实例(using wine data) 2.理论(matlab_svm_2.wmv) a.统计学习理论(Statistical Learning Theory)[SVM的理论基础] b. SVM的基本思想 c. libsvm中采用的各种SVM模型及libsvm 使用详细介绍版权申明:视频归原创作者跟Matlab中文论坛所有,可以在Matlab中文论坛下载或者观看,请勿转载!http://www.77cn.com.cn ! Matlab&Simulink为美国mathworks公司注册商标!版权归mathworks公司所有!

http://www.77cn.com.cn

视频名称:SVM Matlab工具箱分类实例应用及理论介绍 主讲人:faruto(Matlab中文论坛人工智能版主)

版权申明:视频归原创作者跟Matlab中文论坛所有,可以在Matlab中文论坛下载或者观看,请勿转载!http://www.77cn.com.cn ! Matlab&Simulink为美国mathworks公司注册商标!版权归mathworks公司所有!

http://www.77cn.com.cn

what is SVM? SVM:Support Vector Machine 支持向量机,何谓 支持向量??

视频名称:SVM Matlab工具箱分类实例应用及理论介绍 主讲人:faruto(Matlab中文论坛人工智能版主)SVM由Vapnik首先提出(Boser,Guyon and Vapnik,1992;Cortes and Vapnik,1995;Vapnik, 1995,1998). http://www.77cn.com.cn SVM的主要思想是建立一个超平面作为决策曲面,使得正例和反例之间的隔离 边缘被最大化. SVM的优点: 1.通用性(能够在各种函数集中构造函数) 2.鲁棒性(不需要微调) 3.有效性(在解决实际问题中属于最好的方法之一) 4.计算简单(方法的实现只需要利用简单的优化技术) 5.理论上完善(基于VC推广理论的框架)

版权申明:视频归原创作者跟Matlab中文论坛所有,可以在Matlab中文论坛下载或者观看,请勿转载!http://www.77cn.com.cn ! Matlab&Simulink为美国mathworks公司注册商标!版权归mathworks公司所有!

视频名称:SVM Matlab工具箱分类实例应用及理论介绍 主讲人:faruto(Matlab中文论坛人工智能版主)暂且搁置理论层面的东西,看看SVM在实际应用中的效果到底如何? SVM工具箱:种类很多,公认的最好用的是libsvm by 林智仁[台大] ========软件制作者要求给出的软件引用 Chih-Chung Chang and Chih-Jen Lin, LIBSVM : a library for support vector machines,

2001. Software available at http://www.csie.ntu.edu.tw/~cjlin/libsvm ======== http://www.77cn.com.cn

版权申明:视频归原创作者跟Matlab中文论坛所有,可以在Matlab中文论坛下载或者观看,请勿转载!http://www.77cn.com.cn ! Matlab&Simulink为美国mathworks公司注册商标!版权归mathworks公司所有!

视频名称:SVM Matlab工具箱分类实例应用及理论介绍 主讲人:faruto(Matlab中文论坛人工智能版主)

Please choose your compiler for building external interface (MEX) files: Would you like mex to locate installed compilers [y]/n? y Select a compiler: [1] Lcc-win32 C 2.4.1 in D:\MATLAB~1\sys\lcc [2] Microsoft Visual C++ 6.0 in G:\Microsoft Visual Studio [0] None Compiler: 2 ………. ……….

来实际操作一下!O(∩_∩)O

版权申明:视频归原创作者跟Matlab中文论坛所有,可以在Matlab中文论坛下载或者观看,请勿转载!http://www.77cn.com.cn ! Matlab&Simulink为美国mathworks公司注册商标!版权归mathworks公司所有!

http://www.77cn.com.cn

Libsvm-mat-2.86-1安装: >>mex –setup %lets you select or change the compiler configuration >>make ==============

视频名称:SVM Matlab工具箱分类实例应用及理论介绍 主讲人:faruto(Matlab中文论坛人工智能版主)

>> make Error: Could not detect a compiler on local system which can compile the specified input file(s) at D:\MATLAB7/bin/win32/mexsetup.pm line 519. ??? Error using ==> mex Unable to complete successfully Error in ==> make at 3 mex -O -c svm.cpp lz知道这是怎么回事吗?

A:需要你先指定一个编译器才可以.[mex -setup]版权申明:视频归原创作者跟Matlab中文论坛所有,可以在Matlab中文论坛下载或者观看,请勿转载!http://www.77cn.com.cn ! Matlab&Simulink为美国mathworks公司注册商标!版权归mathworks公司所有!

http://www.77cn.com.cn

Q&A[注意事项]: 1.安装时需要把libsvm-mat作为当前的工作目录, 在后面使用时并将其加为工作目录(setpath…). 2.电脑里需要有相应的编译器,可以用自带的,最 好装一个VC. 3.[4.48#]Q:哎,我装VC6了,libsvm目录正确, 也用了下make,可是提示:

视频名称:SVM Matlab工具箱分类实例应用及理论介绍 主讲人:faruto(Matlab中文论坛人工智能版主)

SVM工具箱也装完了,看看他怎么用吧.http://www.77cn.com.cnUsage =====

svmtrain( … ); %通过训练集来训练模型 svmpredict( … );%对测试集进行预测

版权申明:视频归原创作者跟Matlab中文论坛所有,可以在Matlab中文论坛下载或者观看,请勿转载!http://www.77cn.com.cn ! Matlab&Simulink为美国mathworks公司注册商标!版权归mathworks公司所有!

视频名称:SVM Matlab工具箱分类实例应用及理论介绍 主讲人:faruto(Matlab中文论坛人工智能版主) svmtrain( … ); >> model = svmtrain(train_label, train_matrix, ['libsvm_options']); -train_label: An m by 1 vector of training labels (t

ype must be double). -train_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. ===============The 'svmtrain' function returns a model which can be used for future prediction.版权申明:视频归原创作者跟Matlab中文论坛所有,可以在Matlab中文论坛下载或者观看,请勿转载!http://www.77cn.com.cn ! Matlab&Simulink为美国mathworks公司注册商标!版权归mathworks公司所有!

http://www.77cn.com.cn

视频名称:SVM Matlab工具箱分类实例应用及理论介绍 主讲人:faruto(Matlab中文论坛人工智能版主)svmpredict( … ); >> [predicted_label, accuracy, decision_values/prob_estimates] = svmpredict(test_label, test_matrix, model, ['libsvm_options']);-test_label: An m by 1 vector of prediction labels. If labels of test data are unknown, simply use any random values. (type must be double) -testmatrix: 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. =============== decision_values/prob_estimates:回归相关问题中才会涉及到版权申明:视频归原创作者跟Matlab中文论坛所有,可以在Matlab中文论坛下载或者观看,请勿转载!http://www.77cn.com.cn ! Matlab&Simulink为美国mathworks公司注册商标!版权归mathworks公司所有!

http://www.77cn.com.cn

视频名称:SVM Matlab工具箱分类实例应用及理论介绍 主讲人:faruto(Matlab中文论坛人工智能版主)-libsvm_options: A string of training options in the same format as that of LIBSVM. 有关libsvm的参数选项: -c cost:设置C-SVC,e -SVR和v-SVR的参数(损失函数)(默认1) http://www.77cn.com.cn

-g r(gama):核函数中的gamma函数设置(针对多项式/rbf/sigmoid核函 数)(默认1/ k)更多参数介绍,下讲详解.

版权申明:视频归原创作者跟Matlab中文论坛所有,可以在Matlab中文论坛下载或者观看,请勿转载!http://www.77cn.com.cn ! Matlab&Simulink为美国mathworks公司注册商标!版权归mathworks公司所有!

视频名称:SVM Matlab工具箱分类实例应用及理论介绍 主讲人:faruto(Matlab中文论坛人工智能版主)

来看一个libsvm自带的小例子:http://www.77cn.com.cn

matlab> load heart_scale.matmatlab> model = svmtrain(heart_scale_label, heart_scale_inst, '-c 1 -g 0.07'); matlab> [predict_label, accuracy, dec_values] = svmpredict(heart_scale_label, heart_scale_inst, model); % test the training data

版权申明:视频归原创作者跟Matlab中文论坛所有,可以在Matlab中文论坛下载或者观看,请勿转载!http://www.77cn.com.cn ! Matlab&Simulink为美国mathworks公司注册商标!版权归mathworks公司所有!

视频名称:SVM Matlab工具箱分类实例应用及理论介绍

主讲人:faruto(Matlab中文论坛人工智能版主) 看一个具有实际意义的测试数据:测试数据wine, http://archive.ics.uci.edu/ml/index.html 测试数据Wine来源UCI(UC Irvine Machine Learning Repository). 数据记录 的是在意大利某一地区同一区域上三种不同品种的酒的化学成分分析,数据 里含有178个样本属于三个类别(类别标签已给),每个样本含有13个特征分量.

版权申明:视频归原创作者跟Matlab中文论坛所有,可以在Matlab中文论坛下载或者观看,请勿转载!http://www.77cn.com.cn ! Matlab&Simulink为美国mathworks公司注册商标!版权归mathworks公司所有!

http://www.77cn.com.cn

视频名称:SVM Matlab工具箱分类实例应用及理论介绍 主讲人:faruto(Matlab中文论坛人工智能版主)

分类问题处理整体正规流程: Start >> 选定训练集和测试集 >>规范化 >> 特征提取 >> 利用训练集训练分类器得到model >> 利用model对测试集进行预测 >> 分类器性能评测[分类准确率的高低] >> Over 有关规范化的问题: http://www.77cn.com.cn/thread27021-1-1.html 再一次重申,规范化不是必须的要具体问题局看待!!版权申明:视频归原创作者跟Matlab中文论坛所有,可以在Matlab中文论坛下载或者观看,请勿转载!http://www.77cn.com.cn ! Matlab&Simulink为美国mathworks公司注册商标!版权归mathworks公司所有!

http://www.77cn.com.cn

视频名称:SVM Matlab工具箱分类实例应用及理论介绍 主讲人:faruto(Matlab中文论坛人工智能版主)%wine_SVM script by faruto 2009.8.12 %Email:farutoliyang@http://www.77cn.com.cn QQ:516667408 blog:http://www.77cn.com.cn/faruto %http://www.77cn.com.cn load wine_SVM;

groups = ismember(wine_labels,1); % not familiar with ismember? help... help... [train, test] = crossvalind('holdOut',groups); % not familiar with crossvalind? help... help... %train and test here are logical format train_wine = data(train,:); train_wine_labels = groups(train,:); train_wine_labels = double( train_wine_labels ); %in the usage of libsvm, the label vector and instance matrix must be %double. So we have to transfer the format of labels in this case. test_wine = data(test,:); test_wine_labels = groups(test,:); test_wine_labels = double( test_wine_labels ); model = svmtrain(train_wine_labels, train_wine, '-c 1 -g 0.07');

[predict_label, accuracy] = svmpredict(test_wine_labels, test_wine, model);%plot visualization for train_wine 版权申明:视频归原创作者跟Matlab中文论坛所有,可以在Matlab中文论坛下载或者观看,请勿转载!http://www.77cn.com.cn ! Matlab&Simulink为美国mathworks公司注册商标!版权归mathworks公司所有!

http://www.77cn.com.cn

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

视频名称:SVM Matlab工具箱分类实例应用及理论介绍 主讲人:faruto(Matlab中文论坛人工智能版主)

Review:http://www.77cn.com.cn

1.What is SVM? Support Vector Machine 2.SVM工具箱的注意事项

3.S

VM的使用Model = svmtrain(train_label,train,[option]);

[predict_label,accuracy] = svmpredict(test_label,test,model);

版权申明:视频归原创作者跟Matlab中文论坛所有,可以在Matlab中文论坛下载或者观看,请勿转载!http://www.77cn.com.cn ! Matlab&Simulink为美国mathworks公司注册商标!版权归mathworks公司所有!

视频名称:SVM Matlab工具箱分类实例应用及理论介绍 主讲人:faruto(Matlab中文论坛人工智能版主)

QQ:516667408 Email:farutoliyang@http://www.77cn.com.cn http://www.77cn.com.cn/faruto 北京师范大学数学科学学院 复杂系统智能控制实验室 2009.8.12 See you next time~ PS:有事邮箱联系,别站短,我这里打开站内短信慢.嘿嘿.

版权申明:视频归原创作者跟Matlab中文论坛所有,可以在Matlab中文论坛下载或者观看,请勿转载!http://www.77cn.com.cn ! Matlab&Simulink为美国mathworks公司注册商标!版权归mathworks公司所有!

http://www.77cn.com.cn

THE END for matlab_svm_1.wmv 欢迎大家互相交流提高!O(∩_∩)O faruto

本文来源:https://www.bwwdw.com/article/gdai.html

Top