libsvm MATLAB 版本安装
来源:互联网 发布:将军岂愿见之乎 编辑:程序博客网 时间:2024/05/20 15:42
libsvm是封装好的,安装到MATLAB中很方便使用
1、下载libsvm 3.21,下载地址http://www.csie.ntu.edu.tw/~cjlin/libsvm/。
2、将工具包放到任何地方均可,将工具包添加到Matlab的搜索路径。Set Path->add with subfolders->save
3、编译。mex -setup 注意:mex后要有空格,然后再是-。会有以下提示
mex -setup
MEX configured to use 'Microsoft Visual C++ 2010 (C)' for C language compilation.
Warning: The MATLAB C and Fortran API has changed to support MATLAB
variables with more than 2^32-1 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/matlab/matlab_external/upgrading-mex-files-to-use-64-bit-api.html.
To choose a different language, select one from the following:
mex -setup C++
mex -setup FORTRAN
(我第一次编译出现了mex 不存在之类的警告,是因为VS安装后没有重启Matlab)
这时你需要用鼠标点击 mex -setup C++.或者输入mex -setup C++,之后会出现
MEX configured to use 'Microsoft Visual C++ 2010' for C++ language compilation.
Warning: The MATLAB C and Fortran API has changed to support MATLAB
variables with more than 2^32-1 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/matlab/matlab_external/upgrading-mex-files-to-use-64-bit-api.html.
4、编译文件 make
Matlab工作目录进入到libsvm-3.21/matlba,输入make
Building with 'Microsoft Visual C++ 2010 (C)'.
MEX completed successfully.
Building with 'Microsoft Visual C++ 2010 (C)'.
MEX completed successfully.
Building with 'Microsoft Visual C++ 2010'.
MEX completed successfully.
Building with 'Microsoft Visual C++ 2010'.
MEX completed successfully.
看到这个结果说明编译成功。
5、检查SVM是否安装成功
在libsvm-3.21可以看到hear_scale 文件,在命令行输入下面几行代码
clear;
[label_vector, instance_matrix] =libsvmread('heart_scale');
model = svmtrain(label_vector, instance_matrix);
[predicted_label, accuracy, prob_estimates] = svmpredict(label_vector, instance_matrix, model, 'b');
运行成功之后的结果
*
optimization finished, #iter = 162
nu = 0.431029
obj = -100.877288, rho = 0.424462
nSV = 132, nBSV = 107
Total nSV = 132
Accuracy = 86.6667% (234/270) (classification)
- libsvm MATLAB 版本安装
- libsvm(MATLAB版本)安装与使用
- 在windows, linux平台上安装 libsvm (matlab版本)
- Matlab安装使用libsvm
- Matlab 安装libsvm 教程
- Matlab安装使用libsvm
- Matlab安装使用libsvm
- Matlab安装使用libsvm
- libsvm安装(MATLAB)
- matlab 安装libsvm工具箱
- matlab安装libSVM
- matlab安装LIBSVM
- Matlab安装使用libsvm
- Matlab安装使用libsvm
- MATLAB安装libsvm常见问题
- matlab安装libsvm
- matlab安装libsvm
- matlab下安装使用libsvm
- 解决React Native安装应用到真机(红米3S)报Execution failed for task ':app:installDebug'的错误
- linux下动态链接库的显式调用和隐式调用
- nginx模块定制开发中介入http模块的方法及NGX_HTTP_CONTENT_PHASE阶段的详细介绍
- springMVC整合dubbo+zookeeper
- $.extend()方法和(function($){...})(jQuery)详解
- libsvm MATLAB 版本安装
- mycat1.6+mysql(MariaDB 10.1)丢失插入数据
- 顶点、 图元、片元、像素的含义
- 项目A 1.0优化总结
- Linux Kernel(Android) 加密算法总结(三)-应用程序调用内核加密算法接口
- Linux目录结构
- WinFrom快速开发OutLook框架多皮肤经典样式CMS
- jQuery Mobile总结(初级)
- JMeter调试工具---Debug Sampler