我正在尝试通过使用pROC软件包中的auc函数来计算曲线值下的面积。 但是,关于“未使用的参数”仍然面临同样的错误。
sub_2 <- c("No","No","No","No","Yes","Yes","No","No","No","No")
pred_yes <- c(0.36,0.12,0.6,0.6,0.28,0.4,0.08,0.04,0.48,0.00)
auc(actual=ifelse(sub_2 == "Yes",1,0),predicted = pred_yes)
出现以下错误:
Error in auc(actual = ifelse(sub_2 == "Yes", 1, 0), predicted = pred_yes): unused arguments (actual = ifelse(sub_2 == "Yes", 1, 0), predicted = pred_yes)
Traceback:
它在kaggle内核和Mac上的本地环境中显示。不知道这里出了什么问题。你能帮我吗?
答案 0 :(得分:0)
带有参数“actual”和“predicted”的 auc 函数在 Metrics 包中。 您也可以通过调用正确的包来解决错误。