在我的数据集中,泄漏有两个值1和0。只有大约300行的值为1,而569378行的值为0。这就是我在rpart结果中只得到一个根节点的原因。
我该如何解决这个问题?
fm.pipe<-Leakage~PipeAge +PipePressure
> printcp(CART.fit)
Regression tree:
rpart(formula = fm.pipe, data = Data)
Variables actually used in tree construction:
character(0)
Root node error: 299.84/569378 = 0.00052661
n= 569378
CP nsplit rel error xerror xstd
1 0.0033246 0 1 0 0