nbc.h
来自「vc的源代码程序的基于最小特征向量的元素的集合方法的程序源代码」· C头文件 代码 · 共 49 行
H
49 行
#ifndef NBC_TABLE_H#define NBC_TABLE_H#include "dataTab.h"#include "rawDataTable.h"#include "classInfo.h"#include "attributeInfo.h"// Naive Bayesian Classifier// the class NBC_Table consists of the// SupervisedDataTable, AttributeInfoTable and// ClassInfoTable. and also a ClassSummary.class NBC_Table { SupervisedDataTable *trainData; AttributeInfoTable **attrTable; ClassInfoTable *classTable; int error; ClassSummary *cSTable;public: // constructor NBC_Table(Source &src); // classify the raw data table, and write the // classfication results into the raw data table. void NBC_classify(RawDataTable &rDTbl); // return the ojbect pointer of the training data table SupervisedDataTable *getSupervisedDataTable() { return trainData; } // print the training data error rate void reportTrainingDataErrorRate(); // print the probability table void printProbTable(); void showProbSize(); // destructor ~NBC_Table();private: Description classify(int r, int c, RawDataTable &rDTbl); float NBC_calculateProb(int nc, Description *inst, int n_Col); int maxIndex(float *p, int n);};#endif
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?