在我的数据集中,泄漏有两个值 1,0。只有大约 300 行有 1,另外 569378 行中有 1。这就是我在 rpart 结果中只有 1 个根的原因。
我该如何解决这个问题?
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