训练集中的变量在新数据集中丢失

![img](https://img-mid.csdnimg.cn/release/static/image/mid/ask/8811858419
我在输入这段代码后,提示错误Error in predict.randomForest(model1rf1K10K, newdata = deridata1K10K, :
variables in the training data missing in newdata。请求解决方法,感谢!

目测是你的数据中存在一些维为空的情况

不知道你这个问题是否已经解决, 如果还没有解决的话:

如果你已经解决了该问题, 非常希望你能够分享一下解决方案, 写成博客, 将相关链接放在评论区, 以帮助更多的人 ^-^