我该如何计算ranger模型的AUC值?Ranger是R语言中随机森林算法的快速实现。我正在使用以下代码构建用于分类目的的ranger模型,并从模型中获取预测结果:
#Build the model using ranger() function
ranger.model <- ranger(formula, data = data_train, importance = 'impurity',
write.forest = TRUE, num.trees = 3000, mtry = sqrt(length(currentComb)),
classification = TRUE)
#get the prediction for the ranger model
pred.data <- predict(ranger.model, dat = data_test,)
table(pred.data$predictions)
但我不知道如何计算AUC值
有任何想法吗?