featureselection.h

来自「线形判别分析算法和knn最近邻算法的实现」· C头文件 代码 · 共 49 行

H
49
字号
// FeatureSelection.h: interface for the FeatureSelection class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_FEATURESELECTION_H__A3FC1112_F1C0_4925_BB41_9FB559C97DB3__INCLUDED_)
#define AFX_FEATURESELECTION_H__A3FC1112_F1C0_4925_BB41_9FB559C97DB3__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#define COLUMNDIMENSION 64
#define ROWDIMENSION 64
#define OVERLAPLEN 7
#define SUBFIELDIMENSION 16
#define TRAININGNUM 30
#define TESTNUM 20
#define STEP_LENGTH 5
#include <vector>
#include <string>
#include <fstream>
using namespace std;

class FeatureSelection  
{
public:
	FeatureSelection();
	FeatureSelection(string file);
    vector < vector< double > > trainingGroup;
	vector < vector< double > > testGroup;
	int CharacVectorGeneration();
	int OpenSampleFile(string s);
	virtual ~FeatureSelection();
private:
	int samp_num;
	int startRow;
	int destRow;
	int startColumn;
	int destColumn;
	ifstream in_stream;
	vector < vector < int > > bitMap;
	vector < double > characVector;
	int PreOperation();
	int OverlapFeatureSelection();
	double LengthWidthFeatureSelection();
	double PixRatioFeatureSelection();
};

#endif // !defined(AFX_FEATURESELECTION_H__A3FC1112_F1C0_4925_BB41_9FB559C97DB3__INCLUDED_)

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?