知识卡片
基尼划分须按样本加权
节点内各类占比为 p 时,基尼不纯度是 1−Σp²,可理解为按该节点的类别比例独立抽取两个标签时不一致的概率。比较二分需将左右子节点基尼分别乘以它们的样本占比再相加,避免一个很小的纯枝掩盖大枝的混杂。书中程序枚举类别相等与其余值,并直接跳过空枝。
这张卡片看不懂?
这张卡片已通过人工审查,不再接受失败反馈。
已有反馈 · 0 条
还没有人提交反馈。
在整书笔记中的位置
原书出处 · 1 处
- Supervised Learning: Classification · 查看原书依据
The Gini index is another common criterion for splitting in decision tree algorithms. Gini index measures the impurity of a dataset by calculating the probability of misclassifying a randomly chosen element in the dataset. The goal is to minimize the Gini index when splitting
参考来源
- 位置:《Simplified Machine Learning: The Essential Building Blocks for Machine Learning Expertise》第 04 章《Supervised Learning: Classification》(`extracted/Simplified Machine Learningː The Essential Building Blocks for Machine Learning Expertise/_epub-src/OPS/ch04.xhtml`,book-source 项目,正文索引第 365 段)
- 结论依据:原文介绍基尼作为二叉树划分准则,紧随的实际代码写出类别比例平方、左右子集权重以及最小值筛选。
- 原始内容:The Gini index is another common criterion for splitting in decision tree algorithms. Gini index measures the impurity of a dataset by calculating the probability of misclassifying a randomly chosen element in the dataset. The goal is to minimize the Gini index when splitting