CHAID决策树
- 这是另一种决策树,我在做DRGs分组的时候用到了,记录下
CHAID:Chi-square automatic interaction detection
- 这个算法基于adjusted significance testing(Bonferroni testing)
同时,这个算法是AID和THAID的拓展,是G. V. Kass于1980年在《An Exploratory Technique for Investigating Large Quantities of Categorical Data》提出的
Select the predictor that has the smallest adjusted p-value (i.e., most significant). If this
adjusted p-value is less than or equal to a user-specified alpha-level
alpha4, split the node using this predictor. Else, do not split and the
node is considered as a terminal node
R代码
- 这里有两个R包
party
1 | library(party) |
CHAID
- 只接受
factor
和ordered factor
- 只能做分类树,不能做回归树。如果一定要用这个做,只能将连续性变量分类
- 只接受
1 | library(partykit) |