# _______________________________________________________ # SRCS: Statistical Ranking Color Scheme for Visualizing # Parameterized Multiple Pairwise Comparisons in R # ------------------------------------------------------- # by Pablo J. Villacorta and José A. Sáez # email: pjvi -at- decsai.ugr.es (Pablo J. Villacorta) # jose.saezmunoz -at- pwr.edu.pl # # (Work currently under review in the R Journal) # _______________________________________________________ # # Standalone script to create the video sequences of the # first case study. # Application to Dynamic Optimization Problems # AUTHOR: Pablo J. Villacorta Iglesias - pjvi@decsai.ugr.es # Department of Computer Science and Artificial Intelligence # University of Granada (SPAIN) # # TO RUN THE SCRIPT: just source this file from R # (make sure you have ImageMagick installed and you set up # the correct path to the executable file in the # path.to.converter argument) # _______________________________________________________ library(SRCS) load(url("http://decsai.ugr.es/~pjvi/SRCSfiles/MPBall.RData")) # more than 20 MB !! mat = matrix(NA, nrow = nrow(MPBall), ncol = ncol(MPBall)) for(j in 6:ncol(MPBall)){ # take the average as in equation (8) mat[,j] = rowSums(MPBall[,5:j])/(j-5+1) } MPBall[,6:ncol(MPBall)] = mat[,6:ncol(MPBall)] ranksall = SRCSranks(MPBall, params = c("Dim", "CF", "Severity"), target="Algorithm", test = "tukeyHSD", performance=paste("OffError", seq(from=1, to = 100, by = 4), sep = "_"), maximize = FALSE, ncores = 2) animatedplot(x = ranksall, filename = "MPB-convergence.gif", # change path.to.converter = "C:/Program Files/ImageMagick-6.8.8-Q8/convert.exe", yOuter = "Algorithm", xOuter = "Dim", yInner = "CF", xInner = "Severity", zInner = paste0("rank",1:25), # the remaining arguments are optional annotations = paste0("At change ",seq.int(from = 1, to = 100, by = 4)), inner.Y.par = list(levels.at = c("40", "200", "400", "600", "800", "1000"), lab = "Change\nfrequency", levels.loc = "left"), heat.cell.par = list(pty = "s"), inner.X.par = list(levels.at = c("2", "8", "14")), out.Y.par = list(levels.lab.textpar = list(cex = 1, col = "white"), levels.bg = "black", levels.border = "white"), out.X.par = list(lab = "Dimension", levels.bg = "gray"), colorbar.par = list(levels.at = c("-7", "0", "7")), colorbar.axes.par = list(cex.axis = 0.8), show.colorbar = TRUE )