决策树.h
来自「Generate_decision_tree算法由数据划分D的训练元组产生决策树」· C头文件 代码 · 共 67 行
H
67 行
// 决策树.h : PROJECT_NAME 应用程序的主头文件
//
#pragma once
#ifndef __AFXWIN_H__
#error "在包含此文件之前包含“stdafx.h”以生成 PCH 文件"
#endif
#include "resource.h" // 主符号
#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 3
// C决策树App:
// 有关此类的实现,请参阅 决策树.cpp
//
typedef struct DNode
{
int attribute[ATTRIBUTE_NUM];
DNode* next;
}DNode,*pDNode;
typedef struct Attribute
{
CString strName;
bool bSplitted;
}Attribute,*pAttribute;
typedef struct TreeNode
{
bool bIsLeaf;
int leaf;
int AttributeID;
TreeNode *p[MAX_DISCRETE];
}TreeNode,*pTreeNode;
class C决策树App : public CWinApp
{
public:
C决策树App();
// 重写
public:
virtual BOOL InitInstance();
// 实现
DECLARE_MESSAGE_MAP()
};
extern C决策树App theApp;
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?