相关疑难解决方法(0)

当我尝试预测R-caret中的类概率时出错

我用插入符号构建了一个模型.培训结束后,我收到以下警告:

警告消息:在train.default(x,y,weights = w,...)中:至少有一个类级别不是有效的R变量名称; 如果生成类概率,这可能会导致错误,因为变量名称将转换为:X0,X1

变量的名称是:

      str(train)
'data.frame':   7395 obs. of  30 variables:
 $ alchemy_category              : Factor w/ 13 levels "arts_entertainment",..: 2 8 6 6 11 6 1 6 3 8 ...
 $ alchemy_category_score        : num  3737 2052 4801 3816 3179 ...
 $ avglinksize                   : num  2.06 3.68 2.38 1.54 2.68 ...
 $ commonlinkratio_1             : num  0.676 0.508 0.562 0.4 0.5 ...
 $ commonlinkratio_2             : num  0.206 0.289 0.322 0.1 0.222 ...
 $ commonlinkratio_3             : num  0.0471 0.2139 0.1202 0.0167 …
Run Code Online (Sandbox Code Playgroud)

r predict r-caret

27
推荐指数
3
解决办法
4万
查看次数

标签 统计

predict ×1

r ×1

r-caret ×1