predicted <- list(data.frame(sample = sample(10, 20, replace = TRUE),
label = rep(c("Healthy", "Cancer"), each = 10)),
data.frame(sample = sample(10, 20, replace = TRUE),
label = rep(c("Healthy", "Cancer"), each = 10)),
data.frame(sample = sample(10, 20, replace = TRUE),
label = rep(c("Healthy", "Cancer"), each = 10)),
data.frame(sample = sample(10, 20, replace = TRUE),
label = rep(c("Healthy", "Cancer"), each = 10)))
actual <- factor(rep(c("Healthy", "Cancer"), each = 5))
result1 <- ClassifyResult("Example", "Differential Expression", "t-test", LETTERS[1:10], LETTERS[10:1], list(1:100, c(1:9, 11:101)), list(c(1:3), c(2, 5, 6), c(1:4), c(5:8), 1:5),
predicted, actual, list("fold", 2, 2))
result1 <- calcPerformance(result1, "f")
predicted <- data.frame(sample = sample(10, 100, replace = TRUE),
label = rep(c("Healthy", "Cancer"), each = 50))
result2 <- ClassifyResult("Example", "Differential Variability", "F-test", LETTERS[1:10], LETTERS[10:1], list(1:100, c(1:5, 11:105)), list(c(1:3), c(4:6), c(1, 6, 7, 9), c(5:8), c(1, 5, 10)),
list(predicted), actual, validation = list("leave", 1))
result2 <- calcPerformance(result2, "f")
performancePlot(list(result1, result2), performanceName = "Precision-Recall F measure", title = "Comparison", boxLineColouring = "None")
Run the code above in your browser using DataLab