Interpretable Models - Decision Tree

这本书以CART树为例

一、CART树分裂节点的过程

1、对于回归问题,最小化y的方差来决定分裂点。The variance tells us how much the y values in a node are spread around their mean value

2、对于分类问题,最小化y的GINI系数,The Gini index tells us how “impure” a node is, e.g. if all classes have the same frequency, the node is impure, if only one class is present, it is maximally pure。

对于连续数值型变量是分裂点,对类别变量是尝试单个特征下类别的组合

二、Interpretation

2.1 Feature importance

在决策树中,遍历一个特征所有分裂点,计算它比父结点降低了多少方差或者GINI系数,所有特征的importance之和为100。这意味着每个特征的importance可以表示为整个模型importance的百分比。

2.2 Tree decomposition树分解

2.3 优缺点

优点:可以处理捕捉特征的交叉关系、便于可视化、解释性好等。

There is no need to transform features. In linear models, it is sometimes necessary to take the logarithm of a feature. A decision tree works equally well with any monotonic transformation of a feature.

缺点:

不支持线性、缺少平滑性(Slight changes in the input feature can have a big impact on the predicted outcome, which is usually not desirable.因为对分裂点敏感)、不稳定

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值