?? sc.h
字號:
/***********************************************************************sc.h - creates classifiers from feature vectors of examples, as well as classifying example feature vectors.Copyright (C) 1991 Dean RubineThis program is free software; you can redistribute it and/or modifyit under the terms of the GNU General Public License as published bythe Free Software Foundation; either version 1, or (at your option)any later version.This program is distributed in the hope that it will be useful,but WITHOUT ANY WARRANTY; without even the implied warranty ofMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See theGNU General Public License for more details.You should have received a copy of the GNU General Public Licensealong with this program (in ../COPYING); if not, write to the FreeSoftware Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.***********************************************************************//* single path classifier*/#ifndef _SC_H_#define _SC_H_#define MAXSCLASSES 100typedef struct sclassifier *sClassifier; /* single feature-vector classifier */typedef int sClassIndex; /* single feature-vector class index */typedef struct sclassdope *sClassDope; /* single feature-vector class dope */struct sclassdope { char *name; sClassIndex number; Vector average; Matrix sumcov; int nexamples;};struct sclassifier { int nfeatures; int nclasses; sClassDope *classdope; Vector cnst; /* constant term of discrimination function */ Vector *w; /* array of coefficient weights */ Matrix invavgcov; /* inverse covariance matrix */};sClassifier sNewClassifier();sClassifier sRead(); /* FILE *f */void sWrite(); /* FILE *f; sClassifier sc; */void sFreeClassifier(); /* sc */void sAddExample(); /* sc, char *classname; Vector y */void sRemoveExample(); /* sc, classname, y */void sDoneAdding(); /* sc */sClassDope sClassify(); /* sc, y */sClassDope sClassifyAD(); /* sc, y, double *ap; double *dp */sClassDope sClassNameLookup(); /* sc, classname */double MahalanobisDistance(); /* Vector v, u; Matrix sigma */void FixClassifier();void sDumpClassifier();void sDistances();#endif
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -