资源简介
纯C语言实现的支持向量机程序,很不错的参考程序

代码片段和文件信息
/***********************************************************************/
/* */
/* svm_classify.c */
/* */
/* Classification module of Support Vector Machine. */
/* */
/* Author: Thorsten Joachims */
/* Date: 02.07.02 */
/* */
/* Copyright (c) 2002 Thorsten Joachims - All rights reserved */
/* */
/* This software is available for non-commercial use only. It must */
/* not be modified and distributed without prior permission of the */
/* author. The author is not responsible for implications from the */
/* use of this software. */
/* */
/************************************************************************/
# include “svm_common.h“
char docfile[200];
char modelfile[200];
char predictionsfile[200];
void read_input_parameters(int char ** char * char * char * long *
long *);
void print_help(void);
int main (int argc char* argv[])
{
DOC *doc; /* test example */
WORD *words;
long max_docsmax_words_doclld;
long totdoc=0queryidslackid;
long correct=0incorrect=0no_accuracy=0;
long res_a=0res_b=0res_c=0res_d=0wnumpred_format;
long j;
double t1runtime=0;
double distdoc_labelcostfactor;
char *line*comment;
FILE *predfl*docfl;
MODEL *model;
read_input_parameters(argcargvdocfilemodelfilepredictionsfile
&verbosity&pred_format);
nol_ll(docfile&max_docs&max_words_doc&lld); /* scan size of input file */
max_words_doc+=2;
lld+=2;
line = (char *)my_malloc(sizeof(char)*lld);
words = (WORD *)my_malloc(sizeof(WORD)*(max_words_doc+10));
model=read_model(modelfile);
if(model->kernel_parm.kernel_type == 0) { /* linear kernel */
/* compute weight vector */
add_weight_vector_to_linear_model(model);
}
if(verbosity>=2) {
printf(“Classifying test examples..“); fflush(stdout);
}
if ((docfl = fopen (docfile “r“)) == NULL)
{ perror (docfile); exit (1); }
if ((predfl = fopen (predictionsfile “w“)) == NULL)
{ perror (predictionsfile); exit (1); }
while((!feof(docfl)) && fgets(line(int)llddocfl)) {
if(line[0] == ‘#‘) continue; /* line contains comments */
parse_document(linewords&doc_label&queryid&slackid&costfactor&wnum
max_words_doc&comment);
totdoc++;
if(model->kernel_parm.kernel_type == 0) { /* linear kernel */
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 1999 2004-05-15 00:48 支持向量机的C语言程序源码\Ssvmm_lighht3V\svm_light\kernel.h
文件 2195 2004-05-15 00:48 支持向量机的C语言程序源码\Ssvmm_lighht3V\svm_light\LICENSE.txt
文件 2665 2004-08-04 04:47 支持向量机的C语言程序源码\Ssvmm_lighht3V\svm_light\Makefile
文件 7102 2004-07-15 02:50 支持向量机的C语言程序源码\Ssvmm_lighht3V\svm_light\svm_classify.c
文件 25471 2004-08-07 05:41 支持向量机的C语言程序源码\Ssvmm_lighht3V\svm_light\svm_common.c
文件 12832 2004-07-16 22:29 支持向量机的C语言程序源码\Ssvmm_lighht3V\svm_light\svm_common.h
文件 27790 2004-06-02 18:22 支持向量机的C语言程序源码\Ssvmm_lighht3V\svm_light\svm_hideo.c
文件 135816 2004-07-17 10:51 支持向量机的C语言程序源码\Ssvmm_lighht3V\svm_light\svm_learn.c
文件 8580 2004-07-16 23:38 支持向量机的C语言程序源码\Ssvmm_lighht3V\svm_light\svm_learn.h
文件 17691 2004-07-25 15:44 支持向量机的C语言程序源码\Ssvmm_lighht3V\svm_light\svm_learn_main.c
文件 7124 2004-07-15 05:45 支持向量机的C语言程序源码\Ssvmm_lighht3V\svm_light\svm_loqo.c
..AD... 0 2005-03-28 20:22 支持向量机的C语言程序源码\Ssvmm_lighht3V\svm_light
目录 0 2012-03-18 11:44 支持向量机的C语言程序源码\Ssvmm_lighht3V
目录 0 2012-10-08 15:45 支持向量机的C语言程序源码
----------- --------- ---------- ----- ----
249265 14
- 上一篇:QT 飞秋聊天工具 c++
- 下一篇:装载问题c++代码
相关资源
- 操作系统c语言模拟文件管理系统844
- C语言开发实战宝典
- C++中头文件与源文件的作用详解
- C语言代码高亮html输出工具
- 猜数字游戏 c语言代码
- C语言课程设计
- 数字电位器C语言程序
- CCS FFT c语言算法
- 使用C语言编写的病房管理系统
- 通信过程中的RS编译码程序(c语言)
- 计算机二级C语言上机填空,改错,编
- 用回溯法解决八皇后问题C语言实现
- 简易教务管理系统c语言开发文档
- 操作系统课设 读写者问题 c语言实现
- 小波变换算法 c语言版
- C流程图生成器,用C语言代码 生成C语
- 3des加密算法C语言实现
- 简单的C语言点对点聊天程序
- 单片机c语言源程序(51定时器 八个按
- 个人日常财务管理系统(C语言)
- c语言电子商务系统
- 小甲鱼C语言课件 源代码
- 将图片转换为C语言数组的程序
- C语言实现的一个内存泄漏检测程序
- DES加密算法C语言实现
- LINUX下命令行界面的C语言细胞游戏
- 用单片机控制蜂鸣器播放旋律程序(
- 学校超市选址问题(数据结构C语言版
- 电子时钟 有C语言程序,PROTEUS仿真图
- 尚观培训linux许巍老师关于c语言的课
评论
共有 条评论