Classic summary of libsvm (very comprehensive)

Summary of SVM-related resources [matlab-libsvm-class-regress](by faruto)
Summary of SVM-related resources [matlab-libsvm-class-regress](by faruto)
                                                          ----The little thing about SVM
by faruto is okay
   , finally It's over! I've edited this post n times, and I keep adding things to it. I think tonight may be the last time I edit this post. In this post, you can find the following things related to SVM.
1. About the SVM toolbox - libsvm-mat
    (1) The SVM toolbox used by all the resources in this post is libsvm-mat, and no other SVM toolboxes are used. I firmly believe that this SVM toolbox should be studied. The thoroughness is enough, anyway, I am enough!
 (2) Regarding the installation of libsvm-mat, you can read the Q&A below, or you can download the corresponding SVM video I made.
 (3) About the use of the libsvm-mat toolbox itself, you have almost all questions. You can find the answer~
 (4) Regarding the issue of libsvm-mat version update, Lin Zhiren's official latest version is: libsvm-mat-2.89-3, you can find the download link below, there is a problem with the link on the official website, I It was directly from Xiang Lin. There is also a faruto version of libsvm, the latest is [farutoFinalVersion], I have added various sub-functions for SVM parameter optimization in it, which is convenient to use. There are also download links below.
2. About the theory of SVM.
Some resources and paper, ppt, pdf are provided below. Although these resources are limited, I dare to say enough. There are two reasons: a. The following documents are of high quality. b. These Literature The main SVM references have been listed almost all, you can find the path.
3. About......
====================== =================================================
almost (almost everyone) about all the questions you want to ask about libsvm are answered in this thread.
so please read this post in detail. If you can't find the answer to your question, please post again~
libsvm-mat-2.89-3-[farutoFinalVersion]
libsvm-mat-2.89-3-[farutoUltimateVersion2.0]
farutoUltimateVersion2.0 is the final version number. I won't update it anymore~ You can just download this version. Although there have been some updates and optimizations recently, the whole is based on this.
=====================Another libsvm-mat-farutoversion version update history [The version number is a bit messy, please don't mind.O(∩_∩)O]:
farutoUltimateVersion1.0 :2009.10.28
http://www.ilovematlab.cn/viewthread.php?tid=54665&highlight=%2Bfaruto
libsvm-mat-2.89-3-[farutoFinalVersion+pca]:2009.10.28
http://www.ilovematlab.cn/viewthread.php?tid=54658&highlight=%2Bfaruto
libsvm-mat-2.89-3-[farutoFinalVersion]:2009.10.08
http://www.ilovematlab.cn/viewthread.php?tid =52388&highlight=%2Bfaruto
libsvm-mat-2.89-3-farutoVer2:2009.09.23
http://www.ilovematlab.cn/viewthread.php?tid=51166&highlight=%2Bfaruto
libsvm-mat-2.89-3-farutoVer1:2009.08. 27
http://www.ilovematlab.cn/viewthread.php?tid=48175&highlight=%2Bfaruto
============
Welcome to buy "30 Case Studies of MATLAB Neural Networks" (I am the author 1)
SVM is one of the contents of the book.
buy: http://www.ilovematlab.cn/thread-47939-1-1.html
30 Case Studies of MATLAB Neural Networks - Catalogue
http://www.ilovematlab. cn/thread-59023-1-1.html This
book is accompanied by a detailed video of the use of the enhanced toolbox:
SVM explanation video summary [by faruto]http://www.ilovematlab.cn/thread-62252-1-1.html
===============
Frequently asked questions about SVM[libsvm][Q&A]
It is strongly recommended that youpostingany questions about libsvm, check out the Q&A for most questions and you will find the answers there~~O(∩_∩)O
====================
=====SVM introductory high-quality explanation series ten consecutive bullets =============
SVM introductory high-quality explanation series one
SVM introductory high-quality explanation series two & three
SVM introductory high-quality explanation series four
SVM introductory boutique tutorial series five & six SVM
introductory boutique tutorial series seven SVM introductory boutique tutorial series
eight ========================== [Video] Neural network libsvm-mat-enhanced toolbox introduction, the best SVM tutorial http://www. ilovematlab.cn/thread-59483-1-1.html Matlab Neural Network (8.1): Practical Application of SVM Neural Network Theory Matlab Neural Network ( 8.2 ): Theoretical Analysis of SVM Neural Network ======= ==SVM other related links ======================== About the visualization of libsvm classification results and the visualization of classification curves








Binary-class Cross Validation with Different Criteria
A little exploration of using GA to optimize SVM parameters libsvm
-mat-2.89-3-[farutoFinalVersion+pca] A
little exploration of using PSO to optimize SVM parameters A small example of regression analysis - by faruto 's summary post on the selection of SVM parameters c&g [matlab-libsvm] Matlab's FIG (information granulation) + SVM's prediction of the Shanghai index The latest version of libsvm----libsvm-mat- 2.89-3 libsvm update version----faruto version Discussion on some issues about SVM in Matlab [an email exchange] Very good information about SVM and libsvm, I want to study SVM in detail and see the intersection of multi-type problems of this SVM Introduction to the idea of ​​Cross Validation Method Visualization of libsvm classification results and visualization of classification curves [framework] libsvmfarutoUltimateVersion3.0] Then how to use LIBSVM-MAT to draw ROC curves in the installation of Matlab's libsvm ? Re-discuss the problem of normalization ============================================= =====
















SVM Toolbox Quick Start Tutorial (by faruto)
Recently, I found a lot of friends about the use of SVM toolbox. It is also clearly written, but there are still friends asking], but I have no choice but to write a small and simple tutorial to get started. I declare in advance that it is only written for novices, and experts should not read it. In fact, it is in the help file, you can also read it Help file, don't look at my .O(∩_∩)O..
1. The functions that come with matlab (examples in the matlab help file) [only newer versions of matlab have these two SVM functions]
== ===
svmtrain svmclassify
=====Simple Syntax Rules====
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
% Load the data that comes with matlab [the information about the data can be found in UCI, which is one of the classic data of UCI], the obtained data is as follows:
tu1
[attach]24862[/attach]
where meas is 150*4 The matrix represents that there are 150 samples and each sample has 4 attribute descriptions, and species represents the classification of these 150 samples.
data = [meas(:,1), meas(:,2)];
% Only take here The first and second columns of meas, that is, only the first two attributes are selected.
groups = ismember(species,'setosa');
%Because there are three categories in the species category: setosa, versicolor, virginica, in order to make the problem simple, We turn it into a binary classification problem: Setosa and non-Setosa.
[train, test] = crossvalind('holdOut',groups);
cp = classperf(groups);
% randomly select the training set and test set [for the use of crossvalind, please Help yourself]
where cp is used to evaluate the classifier later.
svmStruct = svmtrain(data(train,:),groups(train),'showplot',true);
% Use svmtrain for training to get the structure after training svmStruct, used in prediction. The
training result is shown in the figure:
tu2
[attach]24863[/attach]
classes = svmclassify(svmStruct,data(test,:),'showplot',true);
% Perform classification prediction for the unknown test set, the result is shown in the figure:
tu3
[attach]24864[/attach]
classperf(cp,classes,test );
cp.CorrectRate
ans =
    0.9867
% classifier effect evaluation is to look at the accuracy of the test set classification.
2. Taiwan Lin Zhiren's libsvm
toolbox Download the toolbox [libsvm-mat-2.86-1]:[attach ]24867[/attach]
The installation method is also very simple. Unzip the file, adjust the current working directory to the folder where libsvm is located, and then add the folder where libsvm is located in the set path. Then enter mex
in the command line
-setup % Select the compiler
make
and that's it. It is
recommended that you use the libsvm toolbox, which is better to use. It can be classified [multi-category], predicted....
=========
svmtrain
svmpredict
===============
Brief Syntax:
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
==========================
Case Study:
load heart_scale.mat
% The data in the toolbox is shown in the
figure:
tu4
[attach]24873[/attach]
where heart_scale_inst is the sample, heart_scale_label is the sample label
model = svmtrain(heart_scale_label, heart_scale_inst, '-c 1 -g 0.07') ;
% Training samples, please refer to the help file for the adjustment of specific parameters
[predict_label, accuracy, dec_values] = svmpredict(heart_scale_label, heart_scale_inst, model);
% Classification prediction, here the training set is used as the test set, and the verification effect is as follows:
>> [predict_label , accuracy, dec_values] = svmpredict(heart_scale_label, heart_scale_inst, model); % test the training data
Accuracy = 86.6667% (234/270) (classification)
==============
This time the SVM I have finished talking about this entry point. You can refer to it and get started. I have a simple PPT below about the principle of SVM, which I did when I was working on a project before. , If you are interested, you can take a look. They are all things that can be used quickly. If you want to learn SVM in depth, your study of statistical learning theory and so on... There are a lot of them..
[attach]24876[/attach]
- ---------- Very good information about SVM and libsvm, if you want to study SVM in detail, see this------
[attach]32035[/attach]
[attach]32036[/attach]
[ attach]32037[/attach]
[attach]32038[/attach]
The pdf of Lin Zhiren's 2006 machine learning summer school lecture notes is provided by matlab@man[http://www.ilovematlab.cn/thread-47506-1-1.html]
图:
[attach]32039[/attach]
[attach]32040[/attach]
[attach]32041[/attach]
[attach]32042[/attach]

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326361201&siteId=291194637