Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/Erikfather/Decision_tree-python
/ functions
Functions
23 in github.com/Erikfather/Decision_tree-python
⨍
Functions
23
◇
Types & classes
0
↓ 16 callers
Function
splitdataset
(dataset, axis, value)
tree.py:70
↓ 12 callers
Function
cal_acc
:param test_output: the output of testset :param label: the answer :return: the acc of
tree.py:417
↓ 6 callers
Function
classifytest
输入:决策树,分类标签,测试数据集 输出:决策结果 描述:跑决策树
tree.py:405
↓ 6 callers
Function
read_testset
年龄段:0代表青年,1代表中年,2代表老年; 有工作:0代表否,1代表是; 有自己的房子:0代表否,1代表是; 信贷情况:0代表一般,1代表好,2代表非常好; 类别(是否给贷款):0代表否,1代表是
tree.py:35
↓ 5 callers
Function
cal_entropy
(dataset)
tree.py:53
↓ 5 callers
Function
getNumLeafs
(myTree)
treePlotter.py:14
↓ 5 callers
Function
getTreeDepth
(myTree)
treePlotter.py:25
↓ 4 callers
Function
plotTree
(myTree, parentPt, nodeTxt)
treePlotter.py:43
↓ 3 callers
Function
majorityCnt
数据集已经处理了所有属性,但是类标签依然不是唯一的, 此时我们需要决定如何定义该叶子节点,在这种情况下,我们通常会采用多数表决的方法决定该叶子节点的分类
tree.py:159
↓ 2 callers
Function
C45_chooseBestFeatureToSplit
(dataset)
tree.py:112
↓ 2 callers
Function
CART_chooseBestFeatureToSplit
(dataset)
tree.py:139
↓ 2 callers
Function
ID3_chooseBestFeatureToSplit
(dataset)
tree.py:88
↓ 2 callers
Function
plotMidText
(cntrPt, parentPt, txtString)
treePlotter.py:38
↓ 2 callers
Function
plotNode
(nodeTxt, centerPt, parentPt, nodeType)
treePlotter.py:9
↓ 1 callers
Function
C45_createTree
(dataset, labels, test_dataset)
tree.py:245
↓ 1 callers
Function
CART_createTree
(dataset, labels, test_dataset)
tree.py:315
↓ 1 callers
Function
ID3_createTree
(dataset, labels, test_dataset)
tree.py:174
↓ 1 callers
Function
classify
输入:决策树,分类标签,测试数据 输出:决策结果 描述:跑决策树
tree.py:386
↓ 1 callers
Function
read_dataset
年龄段:0代表青年,1代表中年,2代表老年; 有工作:0代表否,1代表是; 有自己的房子:0代表否,1代表是; 信贷情况:0代表一般,1代表好,2代表非常好; 类别(是否给贷款):0代表否,1代表是
tree.py:13
Function
C45_Tree
(inTree)
treePlotter.py:87
Function
CART_Tree
(inTree)
treePlotter.py:101
Function
ID3_Tree
(inTree)
treePlotter.py:73
Function
createPlot
(inTree)
treePlotter.py:61