Installing LIBSVM in MATLAB

Source: Internet
Author: User

The following is a collection of information found in several LIBSVM related sites, feel very useful, have time to see: Linzhiren home: http://www.csie.ntu.edu.tw/~cjlin/ More about LIBSVM can be consulted by the predecessors: (about LIBSVM dissected) HTTP://WWW.MATLABSKY.COM/THREAD-10966-1-1.HTMLLIBSVM in VS download.csdn.net/detail/u014691453/8075523 ()

LIBSVM is a simple, easy-to-use and efficient software SVM classification and regression. It solves the C-SVM classification, NU-SVM classification, ONE-CLASS-SVM,Ε-SVM regression and NU-SVM regression. It also provides an automatic mode selection tool for the C-SVM classification. This document describes the application of LIBSVM.

1, download LIBSVM first need to download LIBSVM http://www.csie.ntu.edu.tw/~cjlin/libsvm/here can download the latest version of LIBSVM2, Add Toolbox to MATLAB work search directory The work search directory is when you use a function, MATLAB can search the function of all the directory collection

When you use a function, MATLAB will first call the function from the current directory search, if the current directory does not have the function, MATLAB will be from the work search directory in the order from the top to bottom of the search call the function, if the work search directory does not have the function, it will give??? Undefined function or variable ' XXX ' this error. So, in the future, if this error occurs, you might want to look at the directory in which the function you wish to invoke is added to the MATLAB work search directory.

Current directory is the path where MATLAB is currently located

file——>set path ——>Add with Subfolders——> 选取libsvm工具箱所在的路径

3, select the compiler in the MATLAB command window input mex -setupAfter that, you will be asked to choose the compiler code to see if you have installed VC6.0 or a version of VS, if there is a direct selection of the previous number, and then choose the correct installation path to compile.

Note that the general Matlab comes with a compiler lcc-win32 C but this is not available here! Why is it? Because LIBSVM source code is written in C + +, and Lcc-win32 C is a C compiler, C + + source code cannot be compiled!

However, there is usually a problem when you select Yes, the compiler that you installed does not appear. then re-select N, the following will appear more compilers will generally appear on their own installation. If not, then it's tragic, I'm re-installing it.

Note that there will be a version limit. My previous MATLAB is 2012b, vs is also 2012, in the selection of the compiler, whether yes or no with the VS compiler, and then reinstall the VS2010.

4, compile the file first need to put the current directory of the MATLAB [present folder] to the LIBSVM folder in the Command window to enter make, if run without error is successful.

I made in the matlab7 when the error did not resolve the last is to change the system software, everything is OK. Note that the current version is matlab2012b,vs2010

Installing LIBSVM in MATLAB

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.