libsvm学习——windows环境下libsvm-3.23在Python的安装过程

本文介绍了如何在Windows上安装libsvm 3.23版本,包括下载libsvm和gnuplot,处理libsvm.dll,配置环境变量,修改grid.py,验证安装以及进行参数优化的过程。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

一.libsvm简介

       libsvm是台湾林智仁(Chih-Jen Lin) 教授2001年开发的一套支持向量机库,这套库运算速度挺快,可以很方便的对数据做分类或回归。由于libsvm程序小,运用灵活,输入参数少,并且是开源的,易于扩展,因此成为目前国内应用最多的SVM的库。

       libsvm包含的内容:

(1)java文件夹  ,主要应用于java平台;  
(2)python文件夹,是用来参数优选的工具;  
(3)tools文件夹,主要包含四个python文件,用来数据集抽样(subset),参数优选(grid),集成测试(easy), 数据检查(checkdata);  
(4)windows文件夹 , 包含libsvm四个exe程序包,我们所用的库就是他们,里面还有个heart_scale,是一个样本文件,可以用记事本打开,用来测试用的;
(5)svm-toy文件,一个可视化的工具,用来展示训练数据和分类界面,里面是源码,其编译后的程序在windows文件夹下;  
(6)heart_scale文件,是测试用的训练文件;
(7)其他.h和.cpp文件都是程序的源码,可以编译出相应的.exe文件。其中,最重要的是svm.h和svm.cpp文件,svm-predict.c、svm-scale.c和svm-train.c(还有一个svm-toy.c在svm-toy文件夹中)都是调用的这个文件中的接口函数,编译后就是windows下相应的四个exe程序。另外,里面的 README 跟 FAQ 是很好的帮助文件。

二.下载libsvm和gnuplot

1.libsvm(3.23)下载地址:https://www.csie.ntu.edu.tw/~cjlin/libsvm/

  下载完成后解压缩得到如下文件࿱

支持向量机源码,可在 www.csie.ntu.edu.tw/~cjlin/libsvm/ 下载到最新版本,该版本是 2013年4月更新的,3.17 版。压缩包里面有源代码和文档。以下摘自前述网站: Introduction LIBSVM is an integrated software for support vector classification, (C-SVC, nu-SVC), regression (epsilon-SVR, nu-SVR) and distribution estimation (one-class SVM). It supports multi-class classification. Since version 2.8, it implements an SMO-type algorithm proposed in this paper: R.-E. Fan, P.-H. Chen, and C.-J. Lin. Working set selection using second order information for training SVM. Journal of Machine Learning Research 6, 1889-1918, 2005. You can also find a pseudo code there. (how to cite LIBSVM) Our goal is to help users from other fields to easily use SVM as a tool. LIBSVM provides a simple interface where users can easily link it with their own programs. Main features of LIBSVM include Different SVM formulations Efficient multi-class classification Cross validation for model selection Probability estimates Various kernels (including precomputed kernel matrix) Weighted SVM for unbalanced data Both C++ and Java sources GUI demonstrating SVM classification and regression Python, R, MATLAB, Perl, Ruby, Weka, Common LISP, CLISP, Haskell, OCaml, LabVIEW, and PHP interfaces. C# .NET code and CUDA extension is available. It's also included in some data mining environments: RapidMiner, PCP, and LIONsolver. Automatic model selection which can generate contour of cross valiation accuracy.
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值