📄 bcload.h
字号:
/*---------------------------------------------------------------------- File : bcload.h Contents: routines for loading Bayes classifiers and data (common to the X11 and the Windows program) Author : Christian Borgelt History : 18.02.2000 file created from file xbcview.c 30.11.2000 cluster sets replaced by a full Bayes classifier 13.05.2001 definition of E_ATTYPE removed 12.04.2003 clustering result loading added 15.05.2004 function bc_bvnorm added 17.08.2004 radial basis function networks added----------------------------------------------------------------------*/#ifndef __BCLOAD__#define __BCLOAD__#ifndef AS_RDWR#define AS_RDWR#endif#ifndef AS_PARSE#define AS_PARSE#endif#include "attset.h"#include "table.h"#ifndef NBC_PARSE#define NBC_PARSE#endif#include "nbayes.h"#ifndef FBC_PARSE#define FBC_PARSE#endif#include "fbayes.h"#ifndef CLS_PARSE#define CLS_PARSE#endif#ifndef CLS_EXTFN#define CLS_EXTFN#endif#include "cluster.h"#ifndef RBF_PARSE#define RBF_PARSE#endif#ifndef RBF_EXTFN#define RBF_EXTFN#endif#include "rbf.h"#include "bvnorm.h"/*---------------------------------------------------------------------- Preprocessor Definitions----------------------------------------------------------------------*//* --- data formats --- */#define FR_ATTS 0 /* attribute names in first record */#define FR_DATA 1 /* data tuple in first record */#define FR_COMMENT 2 /* comment in first record */#define FMTCHRLEN 80 /* length of format character strings *//* --- error codes --- */#define E_PARSE (-5) /* initialization failed */#define E_CREATE (-6) /* cannot create classifier */#define E_ATTCNT (-7) /* too few numeric attributes */#define E_DATA (-8) /* classifier must be loaded first *//*---------------------------------------------------------------------- Type Definitions----------------------------------------------------------------------*/typedef struct { /* --- range of values --- */ double min, max; /* minimum and maximum value */} RANGE; /* (range of values) */typedef struct { /* --- attribute information --- */ int h_att; /* attribute for horizontal direction */ RANGE h_rng; /* horizontal range of values */ int v_att; /* attribute for vertical direction */ RANGE v_rng; /* vertical range of values */} ATTINFO; /* (attribute information) */typedef struct { /* --- format information --- */ int first; /* contents of first record */ char blanks [FMTCHRLEN+1]; /* blank characters */ char fldseps[FMTCHRLEN+1]; /* field separators */ char recseps[FMTCHRLEN+1]; /* record separators */ char uvchars[FMTCHRLEN+1]; /* unknown value characters */} FMTINFO; /* (format information) *//*---------------------------------------------------------------------- Global Variables----------------------------------------------------------------------*//* --- attribute and classifier/cluster information --- */extern ATTSET *attset; /* attribute set */extern const char **names; /* attribute names */extern RANGE *ranges; /* ranges of attribute values */extern int *attmap; /* map attributes to attset ids. */extern NBC *nbc; /* naive Bayes classifier */extern FBC *fbc; /* full Bayes classifier */extern CLSET *clset; /* cluster set */extern RBFNET *rbf; /* radial basis function network */extern BVNORM *bvnorm; /* bivariate normal distributions */extern int attcnt; /* number of numeric attributes */extern ATTINFO attinfo; /* attribute information *//* --- data information --- */extern TABLE *table; /* data table */extern FMTINFO fmtinfo; /* format information */extern int recno; /* record number (for error messages) *//*---------------------------------------------------------------------- Functions----------------------------------------------------------------------*/extern void bc_clean (void);extern int bc_load (const char *fname);extern int bc_data (const char *fname);extern int bc_bvnorm (void);#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -