⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 dnaclassificationdlg.h

📁 DNA分类
💻 H
字号:
// DNAClassificationDlg.h : header file
//
/********************************************************************/
/*作者:郭南鸣
/*日期:2003.12.2
/*描述:程序界面
/*                   模式识别项目组                                 */
/********************************************************************/

#if !defined(AFX_DNACLASSIFICATIONDLG_H__84E3F274_E08D_47CD_B79C_7A6CD77665BA__INCLUDED_)
#define AFX_DNACLASSIFICATIONDLG_H__84E3F274_E08D_47CD_B79C_7A6CD77665BA__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#include "XPGroupBox.h"

#define WM_UPDATEDATA 1
/////////////////////////////////////////////////////////////////////////////
// CDNAClassificationDlg dialog
class CDNAClassifyBaseClass;

typedef struct tagProcParam
{
	CDNAClassifyBaseClass*  m_pClassify;
	LPVOID                  m_pSamples;
}ProcParam;


class CDNAClassificationDlg : public CDialog
{
// Construction
public:	
	CDNAClassificationDlg(CWnd* pParent = NULL);	// standard constructor


	typedef struct tagTrainingSample
	{
		double**  ppSamples;       //样本
		int*      pExludeSample;   //用于测试的样本
		int*      pClass;          //样本种类
		int       n;               //样本数
		int       c;               //维数
		int       nExclude;        //不用的样本
	}TrainingSample;

	typedef struct tagTestSample
	{
		double**  ppTestSamples;       //样本		
		int*      pClass;          //样本种类
		int       n;               //样本数
		int       c;               //维数		
	}TestSample;

// Dialog Data
	//{{AFX_DATA(CDNAClassificationDlg)
	enum { IDD = IDD_DNACLASSIFICATION_DIALOG };
	CProgressCtrl	m_ProgAnalyse;
	CXPGroupBox	m_ClassifyGroup;
	CXPGroupBox	m_MethodGroup;
	CXPGroupBox	m_ErroGroup;
	CListCtrl	m_listCtrl;
	int		m_nTotalSam;
	double	m_dRate;
	int		m_nErro;
	double	m_dCost;
	int		m_ClassifyMethod;
	int		m_TotalTest;
	double	m_dTestCost;
	//}}AFX_DATA

	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CDNAClassificationDlg)
	protected:
	virtual void DoDataExchange(CDataExchange* pDX);	// DDX/DDV support
	virtual BOOL OnCommand(WPARAM wParam, LPARAM lParam);
	//}}AFX_VIRTUAL

public:
	//读取训练样本
	BOOL ReadTrainSamples(CString filename,CString strSheet);
	//读取测试样本
	BOOL ReadTestSamples(CString filename,CString strSheet);
	//读取训练样本
	BOOL ReadTrainSamples();
	//读取测试样本
	BOOL ReadTestSamples();

	BOOL AllocTrain(TrainingSample& samples,int n,int d);
	BOOL AllocTest(TestSample& samples,int n,int d);

	BOOL ClearTrainSamples(TrainingSample& samples);
	BOOL ClearTestSamples(TestSample& samples);

	BOOL Training();
	BOOL Classify();

	BOOL Training(double **ppSample,int* pClass,int n,int dim);
	BOOL Classify(double **ppTestSample,int* pClass,int n,int dim);
protected:
	CString GetPath();
public:	
	//错误率分析
	UINT static AnalyseProc(LPVOID  pParam);

	//分类
	UINT static ClassifyProc(LPVOID  pParam);

	LRESULT static NotifyStatus(LPVOID lpParam);
// Implementation
protected:
	HICON m_hIcon;

	// Generated message map functions
	//{{AFX_MSG(CDNAClassificationDlg)
	virtual BOOL OnInitDialog();
	afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
	afx_msg void OnPaint();
	afx_msg HCURSOR OnQueryDragIcon();
	afx_msg void OnButtonAnalyse();
	afx_msg void OnDestroy();
	afx_msg void OnButtonClassify();
	virtual void OnOK();
	afx_msg void OnButtonStopanalyse();
	afx_msg void OnButtonStopclassify();
	afx_msg void OnRadioPnn();
	afx_msg void OnRadioNear();
	afx_msg void OnRadioBp();
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
public:
	CDNAClassifyBaseClass*     m_pDNAClassify;

	TrainingSample m_TrainSamples;
	TestSample     m_TestSamples;
	DWORD          m_dwTime;
protected:
	BOOL m_bReaded;
	HANDLE  m_hThread;

	int m_nMode;//方式,是错误率分析还是测试样本分类
	
};

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_DNACLASSIFICATIONDLG_H__84E3F274_E08D_47CD_B79C_7A6CD77665BA__INCLUDED_)

⌨️ 快捷键说明

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