Skip to contents

The AUC of the EAF and the AOC (Hypervolume)

The Area-Over-the-Curve (i.e., the hypervolume) of a set of nondominated sets is exactly the the Area-Under-the-Curve (AUC) of their corresponding EAF, as this example shows.

library(reshape2)
library(ggplot2)

extdata_dir <- system.file(package="moocore", "extdata")
A <- read_datasets(file.path(extdata_dir, "ALG_1_dat.xz"))
A[,1:2] <- normalise(A[,1:2], to_range = c(0,1))

aoc <- mean(sapply(split.data.frame(A[,1:2], A[,3]), hypervolume, reference = 1))
eafA <- eaf(A[,1:2], A[,3])
eafA[,3] <- eafA[,3]/100
auc <- hypervolume(eafA, reference = c(1,1,0), maximise = c(FALSE,FALSE,TRUE))
cat("Runs = ", length(unique(A[,3])),
    "\nAUC of EAF = ", auc,
    "\nMean AOC = ", aoc, "\n")
#> Runs =  90 
#> AUC of EAF =  0.7452171 
#> Mean AOC =  0.7452171

runs <- 5:length(unique(A[,3]))
aocs <- c()
aucs <- c()
for (r in runs) {
  a <- A[A[,3] <= r, ]
  aoc <- mean(sapply(split.data.frame(a[,1:2], a[,3]), hypervolume, reference = 1))
  eafa <- eaf(a[,1:2], a[,3])
  eafa[,3] <- eafa[,3]/100
  auc <- hypervolume(eafa, reference = c(1,1,0), maximise = c(FALSE,FALSE,TRUE))
  aocs <- c(aocs, aoc)
  aucs <- c(aucs, auc)
}

x <- melt(data.frame(r = runs, AOC = aocs, AUC=aucs), id.vars="r")
ggplot(x, aes(r, value, color=variable, linetype=variable)) +
  geom_line(linewidth=1.5) +
  labs(x = "Number of sets", y = "Value", color = "", linetype="")

Plot of EAF AUC versus mean AOC with increasing number of sets.