# NOT RUN {
binned <- DfBinDataset(dataset05, opChType = "ROC")
PlotEmpiricalOperatingCharacteristics(dataset05,
trts= c(1,2), rdrs = seq(1,9), opChType = "ROC")$Plot
PlotEmpiricalOperatingCharacteristics(binned, trts= c(1,2),
rdrs = seq(1,9), opChType = "ROC")$Plot
binned <- DfBinDataset(dataset05, opChType = "AFROC")
PlotEmpiricalOperatingCharacteristics(dataset05,
trts= c(1,2), rdrs = seq(1,9), opChType = "AFROC")$Plot
PlotEmpiricalOperatingCharacteristics(binned, trts= c(1,2),
rdrs = seq(1,9), opChType = "AFROC")$Plot
# }
# NOT RUN {
library(ggplot2)
dataset <- SimulateRocDataset(K1 = 5000, K2 = 7000, a = 1, b = 0.5, seed = 123)
datasetB <- DfBinDataset(dataset, desiredNumBins = 7, opChType = "ROC")
fomOrg <- as.matrix(UtilFigureOfMerit(dataset, FOM = "Wilcoxon"), nrow = 2, ncol = 9)
print(fomOrg)
fomBinned <- as.matrix(UtilFigureOfMerit(datasetB, FOM = "Wilcoxon"), nrow = 2, ncol = 9)
print(fomOrg)
cat("fomOrg = ", mean(fomOrg), "\n")
cat("fomBinned = ", mean(fomBinned), "\n")
x <- PlotEmpiricalOperatingCharacteristics(dataset)$Plot
y <- PlotEmpiricalOperatingCharacteristics(datasetB)$Points
fpf <- y$genAbscissa[-1];fpf <- fpf[-length(fpf)]
tpf <- y$genOrdinate[-1];tpf <- tpf[-length(tpf)]
plotOpPnts <- rbind(data.frame(fpf = fpf, tpf = tpf))
x <- x + geom_point(data = plotOpPnts, aes(x = fpf, y = tpf), size = 4)
print(x)
xx <- PlotEmpiricalOperatingCharacteristics(datasetB)
print(xx$Points)
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab