diff --git a/dots-and-boxplots/Ph1BoxplotsDSC.png b/dots-and-boxplots/Ph1BoxplotsDSC.png index bedb96c..8b253e7 100644 Binary files a/dots-and-boxplots/Ph1BoxplotsDSC.png and b/dots-and-boxplots/Ph1BoxplotsDSC.png differ diff --git a/dots-and-boxplots/Ph1BoxplotsDSC_ue.png b/dots-and-boxplots/Ph1BoxplotsDSC_ue.png index 2cb58d5..ca3af60 100644 Binary files a/dots-and-boxplots/Ph1BoxplotsDSC_ue.png and b/dots-and-boxplots/Ph1BoxplotsDSC_ue.png differ diff --git a/dots-and-boxplots/Ph1BoxplotsNSD.png b/dots-and-boxplots/Ph1BoxplotsNSD.png index d652e67..986f8fc 100644 Binary files a/dots-and-boxplots/Ph1BoxplotsNSD.png and b/dots-and-boxplots/Ph1BoxplotsNSD.png differ diff --git a/dots-and-boxplots/Ph2BoxplotsDSC.png b/dots-and-boxplots/Ph2BoxplotsDSC.png index f51deb4..277ba7a 100644 Binary files a/dots-and-boxplots/Ph2BoxplotsDSC.png and b/dots-and-boxplots/Ph2BoxplotsDSC.png differ diff --git a/dots-and-boxplots/Ph2BoxplotsDSC_ue.png b/dots-and-boxplots/Ph2BoxplotsDSC_ue.png index 5c13e25..c6a7d89 100644 Binary files a/dots-and-boxplots/Ph2BoxplotsDSC_ue.png and b/dots-and-boxplots/Ph2BoxplotsDSC_ue.png differ diff --git a/dots-and-boxplots/Ph2BoxplotsNSD.png b/dots-and-boxplots/Ph2BoxplotsNSD.png index fe36437..d6f6d7e 100644 Binary files a/dots-and-boxplots/Ph2BoxplotsNSD.png and b/dots-and-boxplots/Ph2BoxplotsNSD.png differ diff --git a/msd-dot-boxplots.R b/msd-dot-boxplots.R index e8e4122..aa6e67d 100644 --- a/msd-dot-boxplots.R +++ b/msd-dot-boxplots.R @@ -1,92 +1,93 @@ library(rstudioapi) current_path = rstudioapi::getActiveDocumentContext()$path setwd(dirname(current_path)) library(ggplot2) library(RColorBrewer) source("msd-prepare-data.R") ########################### # Define functions ########################### dot_and_boxplots <- function(data, title, metric) { colourCount = length(unique(data$subtask)) getPalette = colorRampPalette(brewer.pal(8, "Set1")) p <- ggplot(data, aes(x=alg_name, y=value, fill=subtask)) + geom_boxplot() + geom_point(position=position_jitterdodge(), alpha = 0.2, size=1, color = "#5e5858") + facet_grid(task ~ .) + ggtitle(title) + scale_y_continuous(breaks=c(0,0.5,1)) + #scale_fill_brewer("Spectral") + scale_fill_manual(values = getPalette(colourCount)) + xlab("Algorithm") + ylab(metric) + labs(fill = "Target ROI") + theme(axis.text.x = element_text(size = 12, angle = 90, vjust = 0.5, hjust=1), axis.text.y = element_text(size = 13), legend.text = element_text(size = 13), legend.title = element_text(size= 16), axis.title = element_text(size= 16), strip.text = element_text(size = 12), title = element_text(size=16) ) return(p) } ########################### # Read and prepare challenge data ########################### msd_data_matrix <- prepare_data() msd_data_matrix_ph1 <- subset(msd_data_matrix, phase == 1) msd_data_matrix_ph2 <- subset(msd_data_matrix, phase == 2) ########################### # Phase 1 ########################### msd_data_matrix_ph1$alg_name <- factor(msd_data_matrix_ph1$alg_name, c("nnU-Net", "K.A.V.athlon", "NVDLMED", - "Lupin", "CerebriuDIKU", "LS Wang's Group", "MIMI", - "Whale", "UBIlearn", "VST", "BCVuniandes", "BUT", - "A-REUMI01","jiafucang", - "LfB", "AI-MED","Lesswire1", "EdwardMa12593", "RegionTec" + "lupin", "CerebriuDIKU", "LS Wang's Group", "MIMI", + "whale", "VST", "UBIlearn", "A-REUMI01", + "BCVuniandes", "BUT", "LfB", + "jiafucang", + "AI-MED","Lesswire1", "EdwardMa12593", "RegionTec" )) msd_data_matrix_ph1$subtask <- factor(msd_data_matrix_ph1$subtask, c("Edema", "Non-enhancing tumor", "Enhancing tumor", "Left atrium", "Anterior", "Posterior", "Liver", "Liver tumor", "Lung tumor", "Pancreas","Tumor mass", "Prostate PZ", "Prostate TZ" )) # DSC plt_ph1_dsc <- dot_and_boxplots(subset(msd_data_matrix_ph1, score == "DSC"), "Development Phase", "DSC") ggsave(file="dots-and-boxplots/Ph1BoxplotsDSC.png", plot=plt_ph1_dsc, width=12, height=13) # NSD plt_ph1_nsd <- dot_and_boxplots(subset(msd_data_matrix_ph1, score == "NSD"), "Development Phase", "NSD") ggsave(file="dots-and-boxplots/Ph1BoxplotsNSD.png", plot=plt_ph1_nsd, width=12, height=13) ########################### # Phase 2 ########################### msd_data_matrix_ph2$alg_name <- factor(msd_data_matrix_ph2$alg_name, c("nnU-Net", "NVDLMED", "K.A.V.athlon", "LS Wang's Group", - "CerebriuDIKU", "MIMI", - "Whale", "UBIlearn", "LfB", "jiafucang", "A-REUMI01", - "AI-MED","Lupin", - "VST","Lesswire1", "BUT", - "BCVuniandes", - "EdwardMa12593", "RegionTec" + "MIMI","CerebriuDIKU", + "whale", "UBIlearn", "jiafucang", "lupin", + "LfB", "A-REUMI01", + "VST","AI-MED", "Lesswire1", "BUT", + "RegionTec" , "BCVuniandes", + "EdwardMa12593" )) # DSC plt_ph2_dsc <- dot_and_boxplots(subset(msd_data_matrix_ph2, score == "DSC"), "Mystery Phase", "DSC") ggsave(file="dots-and-boxplots/Ph2BoxplotsDSC.png", plot=plt_ph2_dsc, width=12, height=13) # NSD plt_ph2_nsd <- dot_and_boxplots(subset(msd_data_matrix_ph2, score == "NSD"), "Mystery Phase", "NSD") ggsave(file="dots-and-boxplots/Ph2BoxplotsNSD.png", plot=plt_ph2_nsd, width=12, height=13)