Error when I try to predict class probabilities in R - caret

后端 未结 5 960
隐瞒了意图╮
隐瞒了意图╮ 2020-12-09 08:38

I\'ve build a model using caret. When the training was completed I got the following warning:

Warning message: In train.default(x, y, weights = w, ...) : A

5条回答
  •  夕颜
    夕颜 (楼主)
    2020-12-09 09:08

    As stated above the class values must be factors and must be valid names. Another way to insure this is,

    levels(all.dat$target) <- make.names(levels(factor(all.dat$target)))
    

提交回复
热议问题