getting this error in Caret

后端 未结 2 1633
清酒与你
清酒与你 2020-12-11 20:58

I\'m getting the following error and I don\'t know what may have gone wrong. I\'m using R Studio with the 3.1.3 version of R for Windows 8.1 and using the Caret package for

相关标签:
2条回答
  • 2020-12-11 21:35

    It is probably due to having about outcome factor with levels "0" and "1".

    There is a specific warning issued when this happens: At least one of the class levels are not valid R variables names; This may cause errors if class probabilities are generated because the variables names will be converted to: X0, X1"

    It seems that people uniformly ignore warnings so I'm going to make this throw an error in the next version.

    0 讨论(0)
  • 2020-12-11 21:51

    If the variables Gust.SpeedKm.h and Precipitationmm contain only NA's try omitting those variables from your data before running the model. If they contain partial NA's and you think they could have predictive value as features then use imputation. Follow this documentation for pre-processing in caret, including imputation.

    0 讨论(0)
提交回复
热议问题