在R中使用AUC包时出现错误。

时间:2022-06-01 18:29:49

We use the AUC package in R to evaluate the model prediction.

我们使用R中的AUC包来评估模型预测。

Sometimes, we faced the error like below:

有时,我们面临如下错误:

    > plot(roc(pred, yTEST))
    > auc(roc(pred, yTEST)) 
    Error in rank(prob) : argument "prob" is missing, with no default

Could anyone let us know where the error comes from ? Note that: the problem did not occur frequently. For example: we ran 10 models and it happened to 3-4 models.

谁能告诉我们错误从何而来?注意:问题并不经常发生。例如:我们运行了10个模型,结果3-4个模型都出现了这种情况。

1 个解决方案

#1


4  

It sounds like you might have loaded glmnet after AUC (glmnet also has a auc function). Just used AUC:: before the function.

听起来你可能在AUC (glmnet也有AUC功能)之后加载了glmnet。刚用AUC:::在函数之前。

#1


4  

It sounds like you might have loaded glmnet after AUC (glmnet also has a auc function). Just used AUC:: before the function.

听起来你可能在AUC (glmnet也有AUC功能)之后加载了glmnet。刚用AUC:::在函数之前。