决策树:检查您的理解情况
这一页的挑战是回答一系列单选题练习
“训练决策树”部分讨论的材料,单位。
问题 1
将数值特征替换为
负值(例如,将值 +8 更改为 -8),并
确切的数值分割器吗?
我们将学习相同的条件:只有
正/负子项将切换。
太棒了
学习不同的条件,但整体结构
都将保持不变。
如果地图项发生变化,条件也会随之改变。
决策树的结构将完全是
与众不同。
实际上,决策树的结构是
差不多不过,条件会发生变化。
问题 2
哪两个答案最能准确描述仅对一半人进行测试带来的影响
的候选阈值是 X 中随机选择的,
问题 3
如果“信息增益”与“阈值”曲线
有多个局部最大值?
不可能有多个局部最大值。
可以使用多个局部最大值。
问题 4
计算以下分块的信息增益:
节点 | 正例数量 | 否定关键字数量
示例 |
父节点 | 10 | 6 |
第一个孩子 | 8 | 2 |
第二个孩子 | 2 | 4 |
点击该图标即可查看答案。
# Positive label distribution
p_parent = 10 / (10+6) # = 0.625
p_child_1 = 8 / (8+2) # = 0.8
p_child_2 = 2 / (2+4) # = 0.3333333
# Entropy
h_parent = -p_parent * log(p_parent) - (1-p_parent) * log(1-p_parent) # = 0.6615632
h_child_1 = ... # = 0.5004024
h_child_2 = ... # = 0.6365142
# Ratio of example in the child 1
s = (8+2)/(10+6)
f_final = s * h_child_1 + (1-s) * h_child_2 # = 0.5514443
information_gain = h_parent - f_final # = 0.1101189
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2024-08-29。
[null,null,["最后更新时间 (UTC):2024-08-29。"],[[["This webpage presents a series of multiple-choice exercises focused on evaluating your understanding of decision tree training concepts."],["The exercises cover topics such as the impact of feature manipulation on decision tree structure, the effects of altering threshold selection strategies, and the implications of multiple local maxima in information gain curves."],["One question requires calculating information gain using entropy and provided data, demonstrating the practical application of decision tree principles."]]],[]]