我的训练数据集有 40000 行。在我使用 CART 模型拟合之后
fit<-rpart(y~x,method="class")
我试图使用
predict(fit,data.frame(new_x),family="response")
错误信息是:
Warning message:
`'newdata' had 100 rows but variable(s) found have 40000 rows.`
此外,我检查了"predicted value
“,它们实际上是使用 training 拟合值x
。有人知道原因吗?