LibSvm添加到Matlab
1.下载libSVM工具包
http://pan.baidu.com/s/1bnGNTBT或者下载最新版的到http://www.csie.ntu.edu.tw/~cjlin/libsvm/
2.解压缩后放在matlab的toolbox目录下
如我的目录C:\Program Files\MATLAB\R2012a\toolbox\libsvm
3.打开matlab,matlab的菜单 File->Set Path->add with subfolders(可直接用Add Folder)里,把C:\Program Files\MATLAB\R2011a\toolbox\libsvm\matlab目录也添加进去
4.在matlab中输入mex –setup
>> mex -setup Welcome to mex -setup. This utility will help you set up
a default compiler. For a list of supported compilers, see
http://www.mathworks.com/support/compilers/R2012a/win64.html Please choose your compiler for building MEX-files: Would you like mex to locate installed compilers [y]/n? y Select a compiler:
[] Microsoft Visual C++ SP1 in C:\Program Files (x86)\Microsoft Visual Studio 9.0 [] None Compiler: Please verify your choices: Compiler: Microsoft Visual C++ SP1
Location: C:\Program Files (x86)\Microsoft Visual Studio 9.0 Are these correct [y]/n? y ***************************************************************************
Warning: MEX-files generated using Microsoft Visual C++ require
that Microsoft Visual Studio run-time libraries be
available on the computer they are run on.
If you plan to redistribute your MEX-files to other MATLAB
users, be sure that they have the run-time libraries.
*************************************************************************** Trying to update options file: C:\Users\Wind\AppData\Roaming\MathWorks\MATLAB\R2012a\mexopts.bat
From template: C:\PROGRA~\MATLAB\R2012a\bin\win64\mexopts\msvc90opts.bat Done . . . **************************************************************************
Warning: The MATLAB C and Fortran API has changed to support MATLAB
variables with more than ^- elements. In the near future
you will be required to update your code to utilize the new
API. You can find more information about this at:
http://www.mathworks.com/help/techdoc/matlab_external/bsflnue-1.html
Building with the -largeArrayDims option enables the new API.
**************************************************************************
不同的电脑因为安装的vc版本不同可能会出现不同的结果
5.在matlab current Floder中进入libSVM下的matlab路径
在matlab中输入make
如果顺利的话,可以正确编译
6.测试是否安装
>>[heart_scale_label,heart_scale_inst] =libsvmread('heart_scale');
>>model = svmtrain(heart_scale_label, heart_scale_inst, '-c 1 -g 0.07');
*
optimization finished, #iter = 134
nu = 0.433785
obj = -101.855060, rho = 0.426412
nSV = 130, nBSV = 107
Total nSV = 130
>>[predict_label, accuracy, dec_values] = svmpredict(heart_scale_label, heart_scale_inst, model); %
输出
Accuracy = 86.6667% (234/270) (classification)
证明已经配置完成
LibSvm添加到Matlab的更多相关文章
- 关于libsvm工具箱在64位matlab下的安装说明
LIBSVM工具箱的安装 基本方法: 1.在网上下载LIBSVM工具箱. http://www.csie.ntu.edu.tw/~cjlin/libsvm/ 2.将LIBSVM工具箱所在目录添加到MA ...
- Libsvm的MATLAB调用和交叉验证
今天听了一个师兄的讲课,才发现我一直在科研上特别差劲,主要表现在以下几个方面,(现在提出也为了督促自己在以后的学习工作道路上能够避免这些问题) 1.做事情总是有头无尾,致使知识点不能一次搞透,每次在用 ...
- libSVM在matlab下的使用安装
1) 从LIBSVM的官网http://www.csie.ntu.edu.tw/~cjlin/libsvm/上下载最新版本的LIBSVM,当前版本为libsvm-3.18.zip 2) 解压压缩包到电 ...
- MATLAB 安装使用libsvm详细步骤
根据本文后面部分博友提出的在配置过程中出现的问题,其中需要特别强调的一点:整个过程,都是在 libsvm-3.12\matlab目录下操作的.如果这一点你忽视了,你不可能解决配置中报的Bug,即使重新 ...
- Libsvm在matlab环境下使用指南
一.安装 http://www.csie.ntu.edu.tw/~cjlin/libsvm/matlab/.在这个地址上可以下的包含matlab接口的源程序.下载完后可以放到放到任意的盘上解压,最好建 ...
- matlab配置Libsvm 防止备忘录
1 首先我们要下载一个Libsvm 工具箱 其中,这一切都可以被下载到 2 我们解包 我解压在桌面上 住址C:\Users\Administrator\Desktop\libsvm 3打开matlab ...
- 在Matlab中安装使用libsvm详细步骤(附图)
今天自己在matlab中安装libsvm,下面是详细的步骤 1.首先下载libsvmhttp://www.csie.ntu.edu.tw/~cjlin/libsvm/我的matlab版本 R2016a ...
- Matlab2012a下配置LibSVM—3.18
1.下载最新版LibSVM 点击此处打开网页,点击zip file下载最新版的文件并解压放在任何目录下,建议放在安装目录便于查找.如我的文件解压在路径C:\ProgramFiles\MATLAB\R2 ...
- EMD分析 Matlab 精华总结 附开源工具箱(全)
前言: 本贴写于2016年12与15日,UK.最近在学习EMD(Empirical Mode Decomposition)和HHT(Hilbert-Huang Transform)多分辨信号处理,FQ ...
随机推荐
- lodash toString 转换为字符串
转换 value 为字符串. null 和 undefined 将返回空字符串.-0 将被转换为字符串"-0". _.toString(null); // => '' _.t ...
- 一个简单的MariaDB认证插件demo
代码地址如下:http://www.demodashi.com/demo/13076.html 一.前言 众所周知(其实可能很多人不知道)MariaDB支持插件认证.在MariaDB中新建用户,常见的 ...
- strults2标签s:set的用法
struts2标签<s:set></s:set>的用法.原理 http://liuna718-163-com.iteye.com/blog/1124654 我的例子: ...
- .NET下的ORM框架有哪些
现在市面上针对.NET ORM框架越来越多 微软自家的LINQ to SQL, ADO.NET Entity Framework不多说. 商业: 1.LightSpeed(免费版比较垃圾.表限制8个. ...
- 解析式/推导式, 生成器 datetime 内建函数
列表解析式(List Comprehension) 语法: [返回值 for 元素 in 可迭代对象 if 条件] 使用中括号[],内部是for循环,if条件可选. 返回一个新的列表. 列表解析式的作 ...
- STL vector的构造函数和析构函数(2)
原文来自:点击打开链接 译文: public member function vector的构造器:这里我仅仅翻译C++11的,C++98的就不翻译了. 构造器原型: <vector> s ...
- Go环境IDE安装配置
终于配好了自己的Go环境,每天可以来一点积累了. MAC安装配置过程参考了如下几个博文~谢谢 Intellij安装配置: http://blog.csdn.net/fenglailea/article ...
- Spring Boot(五):Spring Boot的启动器Starter大全及自定义Starter
现有启动器Starter目录 Spring Boot应用启动器基本的一共有44种,具体如下: 1)spring-boot-starter 这是Spring Boot的核心启动器,包含了自动配置.日志和 ...
- Atitit. 二进制数据ascii表示法,与base64编码解码api 设计标准化总结java php c#.net
Atitit. 二进制数据ascii表示法,与base64编码解码api 设计标准化总结java php c#.net 1. Base64编码,1 1.1. 子模式 urlsafe Or url u ...
- 从头认识Spring-3.8 简单的AOP日志实现(注解版)-扩展添加检查订单功能,以便记录并检測输入的參数
这一章节我们讨论一下扩展添加检查订单功能,以便记录并检測输入的參数. 1.domain 蛋糕类: package com.raylee.my_new_spring.my_new_spring.ch03 ...