R ';插入符号';列车()中的程序包错误:“;所有精度度量值均缺失“;

R ';插入符号';列车()中的程序包错误:“;所有精度度量值均缺失“;,r,r-caret,R,R Caret,我使用“插入符号”软件包来训练具有“polr”软件包的模型(进行顺序逻辑回归)。以下是我的设置: fitControl <- trainControl( method = "repeatedcv", number = 5, repeats = 5) set.seed(825) ordinallogitfit <- train(BTC ~ TallyZero3 + LastMove:C

我使用“插入符号”软件包来训练具有“polr”软件包的模型(进行顺序逻辑回归)。以下是我的设置:

fitControl <- trainControl(
    method = "repeatedcv",
    number = 5,
    repeats = 5)

set.seed(825)
ordinallogitfit <- train(BTC ~ 
                           TallyZero3 + LastMove:ConsecUp + LastMove:ConsecDown +
                           TallyUp1:ConsecDown + LastMove:UpMaxPoint, data = training, 
                 method = "polr", 
                 trControl = fitControl,
                 verbose = TRUE)
看起来最后一条信息是最重要的,但我不知道该怎么办。我的数据没有NAs,也没有无限值。我的响应变量表示为一个具有3个级别的因子。我所有的输入变量都是整数(不是分类变量,只是整数/计数)

错误的原因是什么?如何修复

多谢各位


编辑:我刚刚尝试直接使用polr()函数,没有出现错误-看起来这一定是“插入符号”包本身的问题。

您可以尝试在解决此问题的方法中添加tuneGrid吗?基本上,您需要向polr表明您需要一个逻辑模型。如果它工作,我会关闭这一个重复。
Something is wrong; all the Accuracy metric values are missing:
    Accuracy       Kappa    
 Min.   : NA   Min.   : NA  
 1st Qu.: NA   1st Qu.: NA  
 Median : NA   Median : NA  
 Mean   :NaN   Mean   :NaN  
 3rd Qu.: NA   3rd Qu.: NA  
 Max.   : NA   Max.   : NA  
 NA's   :5     NA's   :5  
Error: Stopping
In addition: There were 14 warnings (use warnings() to see them)
warnings()
Warning messages:
1: model fit failed for Fold1.Rep1: method=logistic Error in family$linkfun(mustart) : 
  Argument mu must be a nonempty numeric vector

2: In glm.fit(X, y1, wt, family = binomial("probit"), offset = offset) :
  no observations informative at iteration 1
3: glm.fit: algorithm did not converge
4: model fit failed for Fold1.Rep1: method=probit Error : object of type 'closure' is not subsettable

5: In glm.fit(X, y1, wt, family = binomial("probit"), offset = offset) :
  no observations informative at iteration 1
6: glm.fit: algorithm did not converge
7: model fit failed for Fold1.Rep1: method=loglog Error : object of type 'closure' is not subsettable

8: In glm.fit(X, y1, wt, family = binomial("probit"), offset = offset) :
  no observations informative at iteration 1
9: glm.fit: algorithm did not converge
10: model fit failed for Fold1.Rep1: method=cloglog Error : object of type 'closure' is not subsettable

11: In glm.fit(X, y1, wt, family = binomial("cauchit"), offset = offset) :
  no observations informative at iteration 1
12: glm.fit: algorithm did not converge
13: model fit failed for Fold1.Rep1: method=cauchit Error : object of type 'closure' is not subsettable

14: In nominalTrainWorkflow(x = x, y = y, wts = weights, info = trainInfo,  ... :
  There were missing values in resampled performance measures.