资源简介
纯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语言实现
- C语言实现的文件存储引擎
- 极其强大的C语言学生成绩管理系统(
- BACNet C语言代码,简单实用
- 能够移动的小方块,很多年前用C语言
- C语言编程流程图自动生成
- 二进制乘法多种方式 C语言
- 赫夫曼编码(C语言编写
- 用C语言实现ARC圆弧插补计算
- 基于TMS320VC5416的DTMF双音多频发生与检
- 阅览室问题C语言实现
- c++ c 数据结构 课程设计 学生成绩管理
- C语言编写的高精度求积分函数
- 使用c语言实现图像二值化
- c语言实现的自动贩卖机程序
- 人事管理系统C语言课程设计报告
- C语言 马踏棋盘 完整代码及实验报告
- C语言 图书馆借阅管理系统 完整代码
- UDP协议客户端服务器间视频传输c源码
- 基于51单片机的c语言编写的计算器程
- 简单时间获取,用c语言编写,客户端
- C语言课程设计 - 学生宿舍管理系统
- C语言大作业 西北工业大学
- 3DES,C语言版,ECB,PKCS7
- 利用LINUX FIFO命名管道技术实现双向聊
- C语言学生宿舍管理程序源代码
- kcf目标跟踪C代码
- 围棋C语言代码要满十字
- 逆波兰表达式 c语言实现
- 指法练习 C语言源代码
评论
共有 条评论