📄 copy of adaboost_common.h
字号:
#if !defined(AFX_TEST_H__B678A414_54CC_480B_8068_4FAEED66F002__INCLUDED_)
#define AFX_TEST_H__B678A414_54CC_480B_8068_4FAEED66F002__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
/* # define MICROSOFT */
# include <stdio.h>
# include <ctype.h>
# include <math.h>
# include <string.h>
# include <stdlib.h>
# include <time.h>
# include <float.h>
# include "matrix.h"
# define VERSION "V1.0"
# define VERSION_DATE "11.5.03"
# define CFLOAT float /* the type of float to use for caching */
/* kernel evaluations. Using float saves */
/* us some memory, but you can use double, too */
# define FNUM long /* the type used for storing feature ids */
# define FVAL float /* the type used for storing feature values */
# define LINEAR 0 /* linear kernel type */
# define POLY 1 /* polynoial kernel type */
typedef struct word
{
FNUM wnum;
FVAL weight;
} SVM_WORD;
typedef struct doc
{
long docnum;
double twonorm_sq;
SVM_WORD *words;
} DOC;
typedef struct adaboost_parm
{
} ADABBOST_PARM;
int read_documents(char *, DOC *, long *, long, long, long *, long *);
int read_train_file(char *,long,long,long, Matrix*,Matrix*);
int read_test_file(char *,long,long,long,Matrix*,Matrix*);
int adaBoost(Matrix*,Matrix*,long,long,int,int,Matrix*,Matrix*,Matrix*);
int weakLearner(Matrix*, Matrix*, Matrix*,long,long, int, int*, int*);
int getError(Matrix*,Matrix*,Matrix*,Matrix*,Matrix*,Matrix*,Matrix*,Matrix*,Matrix*,long, long,int,int);
int parse_dataset(char *, long *, long *, long);
int parse_document(char *, DOC *, long *, long *, long);
int nol_ll(char *file,long *nol,long *wol,long *ll);
long get_runtime();
void *my_malloc(long);
void copyright_notice();
int isnan(double);
void printe(char* str);
void printm(char* str);
#endif // !defined(AFX_TEST_H__B678A414_54CC_480B_8068_4FAEED66F002__INCLUDED_)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -