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

📄 贝叶斯分类dlg.h

📁 用于数据挖掘的一个小实验
💻 H
字号:
// 贝叶斯分类Dlg.h : header file
//

#if !defined(AFX_DLG_H__94B4D483_E9F9_4C82_80FD_7F8E45D3E662__INCLUDED_)
#define AFX_DLG_H__94B4D483_E9F9_4C82_80FD_7F8E45D3E662__INCLUDED_

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

/////////////////////////////////////////////////////////////////////////////
// CMyDlg dialog
#define	YOUTH		0
#define	MIDDLE_AGED	1
#define SENIOR		2

#define HIGH	0
#define MEDIUM	1
#define LOW		2

#define NO		0
#define YES		1

#define FAIR		0
#define EXCELLENT	1

#define ATTRIBUTE_NUM	5

#define MAX_DISCRETE	2

// C决策树App:
// 有关此类的实现,请参阅 决策树.cpp
//
typedef struct DNode
{
	int attribute[ATTRIBUTE_NUM];
	DNode* next;
}DNode,*pDNode;

typedef struct Attribute
{
	CString strName;
}Attribute,*pAttribute;

class CMyDlg : public CDialog
{
// Construction
public:
	DNode* Dall;
	CMyDlg(CWnd* pParent = NULL);	// standard constructor
	void CreateTranningElement(void);
	void AddToD(int age, int income, int student, int credit_rating, int buys_computer);
	void Output(DNode* D);
	int Pcondition[3][4][2];//每一个条件的条件概率
	int Presult[2];
	void Bayes(DNode *D);
// Dialog Data
	//{{AFX_DATA(CMyDlg)
	enum { IDD = IDD_MY_DIALOG };
	int		m_nage;
	int		m_nincome;
	int		m_nstudent;
	int		m_ncredit;
	CString	m_strout;
	//}}AFX_DATA

	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CMyDlg)
	protected:
	virtual void DoDataExchange(CDataExchange* pDX);	// DDX/DDV support
	//}}AFX_VIRTUAL

// Implementation
protected:
	HICON m_hIcon;

	// Generated message map functions
	//{{AFX_MSG(CMyDlg)
	virtual BOOL OnInitDialog();
	afx_msg void OnPaint();
	afx_msg HCURSOR OnQueryDragIcon();
	afx_msg void OnButton1();
	afx_msg void OnButton2();
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};

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

#endif // !defined(AFX_DLG_H__94B4D483_E9F9_4C82_80FD_7F8E45D3E662__INCLUDED_)

⌨️ 快捷键说明

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