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

后端 未结 5 935
隐瞒了意图╮
隐瞒了意图╮ 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:28

    As per the above example, usually refactoring the outcome variable will fix the problem. It's better to change in the original dataset before partitioning into training and test datasets

    levels <- unique(data$outcome) data$outcome <- factor(data$outcome, labels=make.names(levels))

    As others pointed out earlier, this problem only occurs when classProbs=TRUE which causes the train function to generate additional statistics related to the outcome class

提交回复
热议问题