predicted <- data.frame(sample = sample(10, 100, replace = TRUE),
label = rep(c("Healthy", "Cancer"), each = 50))
actual <- factor(rep(c("Healthy", "Cancer"), each = 5))
rankList <- list(list(1:100, c(5:1, 6:100)), list(c(1:9, 11:101), c(1:50, 60:51, 61:100)))
result1 <- ClassifyResult("Example", "Differential Expression", "Example Selection", LETTERS[1:10], LETTERS[10:1],
rankList,
list(list(rankList[[1]][[1]][1:15], rankList[[1]][[2]][1:15]),
list(rankList[[2]][[1]][1:10], rankList[[2]][[2]][1:10])),
list(predicted), actual, list("fold", 2, 2))
predicted[, "label"] <- sample(predicted[, "label"])
rankList <- list(list(1:100, c(sample(20), 21:100)), list(c(1:9, 11:101), c(1:50, 60:51, 61:100)))
result2 <- ClassifyResult("Example", "Differential Variability", "Example Selection", LETTERS[1:10], LETTERS[10:1],
rankList,
list(list(rankList[[1]][[1]][1:15], rankList[[1]][[2]][1:15]),
list(rankList[[2]][[1]][1:10], rankList[[2]][[2]][1:10])),
list(predicted), actual, validation = list("fold", 2, 2))
selectionPlot(list(result1, result2), xVariable = "classificationName", xLabel = "Analysis", columnVariable = "None", rowVariable = "None", boxFillColouring = "classificationName")
selectionPlot(list(result1, result2), comparison = "size", xVariable = "classificationName", xLabel = "Analysis", columnVariable = "None", rowVariable = "None", boxFillColouring = "size", boxFillBinBoundaries = seq(0, 100, 10),
setSizeBinBoundaries = seq(0, 25, 5), boxLineColouring = "None")
oneRanking <- c(10, 8, 1, 2, 3, 4, 7, 9, 5, 6)
otherRanking <- c(8, 2, 3, 4, 1, 10, 6, 9, 7, 5)
oneResult <- SelectResult("Example", "One Method", list(oneRanking), list(oneRanking[1:5]))
otherResult <- SelectResult("Example", "Another Method", list(otherRanking), list(otherRanking[1:2]))
selectionPlot(list(oneResult, otherResult), comparison = "selectionName", xVariable = "selectionName", xLabel = "Selection Method", columnVariable = "None", rowVariable = "None", boxFillColouring = "selectionName", boxLineColouring = "None")
Run the code above in your browser using DataLab