是否可以通过多种预测将升力曲线绘制为ROC曲线?

我已经用多个预测绘制了ROC,但是我找不到如何在当前图形中实现AUC的功能。

我正在尝试将AUC添加到情节中,但是还没有发现任何有用的方法来确保将AUC纳入考虑范围。此外,如果有一种方法可以在图表上显示分类器的图例,那么会很棒。

library("readxl")
library(pROC)
library(ROCR)
library(randomforest)
library(caret)
library(e1071)
library(readr)
library(ggplot2)
library(DMwR)
library("ggpubr")
library("funmodeling")
options(scipen = 999)
library(funmodeling)

#import data
customer_offer<- read_excel("/Applications/R Practice/mydata/R_Post_Module.xlsx")

#convert to dataframe
customer_offer_data<- data.frame(customer_offer)

class_prediction1<-
  ifelse(customer_offer_data$Predicted > 0.5,1,0
  )

class_prediction2<-
  ifelse(customer_offer_data$Predicted > 0.05,0
  )

preds <- cbind(p1 = class_prediction1,p2 = abs(class_prediction2 + 
                          rnorm(length(customer_offer_data$Predicted),0.1)))

pred.mat <- prediction(preds,labels = matrix(customer_offer_data$actual,nrow = length(customer_offer_data$actual),ncol = 2) )

perf.mat <- performance(pred.mat,"tpr","fpr")
plot(perf.mat,colorize=TRUE) 

atx860 回答:是否可以通过多种预测将升力曲线绘制为ROC曲线?

暂时没有好的解决方案,如果你有好的解决方案,请发邮件至:iooj@foxmail.com
本文链接:https://www.f2er.com/1441095.html

大家都在问