作者热门文章
- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
sklearn中min_impurity_decrease的定义是
A node will be split if this split induces a decrease of the impurity greater than or equal to this value.
最佳答案
史蒂夫,这个回复迟到了,但在这里发布以防其他人遇到这个问题并想了解更多关于最小杂质减少的信息。
可以找到最小杂质减少函数公式here .
公式定义为:
N_t / N * (impurity - N_t_R / N_t * right_impurity
- N_t_L / N_t * left_impurity)
其中N是样本总数,N_t是当前节点的样本数,N_t_L是左 child 的样本数,N_t_R是右 child 的样本数。
N_t = 26
N = 90
N_t_R = 4
N_t_L = 22
impurity = 0.2041
right impurity = 0.375
left impurity = 0
我计算出的杂质减少量为 0.04,这不符合您指定的阈值 0.1。所以本质上,这个公式考虑了父节点占总树的多少(N_t/N)以及从子节点减少的加权杂质。如果最终的杂质减少量小于最小杂质减少量参数,则不会执行拆分。
关于python - sklearn min_impurity_decrease 解释,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54812230/
sklearn中min_impurity_decrease的定义是 A node will be split if this split induces a decrease of the impur
我是一名优秀的程序员,十分优秀!