Commits

Piotr Jessa committed 653a58c

Adding wilcoxon testing for ANOVA methods

Comments (0)

Files changed (3)

resources/benchmarks/mgr-test12/wilcoxon.txt

+BOA_0,Pure_Push_0,0.133614402537715
+BOA_0,Push_0,0.834827329185239
+BOA_0,TGP_0,1,
+BOA_0,UMDA_0,0.000107511176729501
+Pure_Push_0,Push_0,0.225252906360653
+Pure_Push_0,TGP_0,0.0081509715935027
+Pure_Push_0,UMDA_0,0.0081509715935027
+Push_0,TGP_0,0.465208818452142
+Push_0,UMDA_0,0.000311490976767384
+TGP_0,UMDA_0,2.03455461454443e-07
+BOA_1,Pure_Push_1,0.617075077451974
+BOA_1,Push_1,0.00455634980318513
+BOA_1,TGP_1,0.000260729632855317
+BOA_1,UMDA_1,0.0495346134356267
+Pure_Push_1,Push_1,0.000646749122576476
+Pure_Push_1,TGP_1,0.000643697525469688
+Pure_Push_1,UMDA_1,0.00467773498104726
+Push_1,TGP_1,5.33726360033909e-07
+Push_1,UMDA_1,1.59924735932474e-05
+TGP_1,UMDA_1,0.193646431269221
+BOA_2,Pure_Push_2,0.116664464781023
+BOA_2,Push_2,0.847389659686714
+BOA_2,TGP_2,0.00101500094711307
+BOA_2,UMDA_2,9.63357008643095e-07
+Pure_Push_2,Push_2,0.0081509715935027
+Pure_Push_2,TGP_2,0.852683684334643
+Pure_Push_2,UMDA_2,0.000182810632981835
+Push_2,TGP_2,0.000157052284230751
+Push_2,UMDA_2,4.2249094050057e-06
+TGP_2,UMDA_2,8.94473182490033e-07

resources/benchmarks/mgr-test13/wilcoxon.txt

+BOA_0,Pure_Push_0,0.000107511176729501
+BOA_0,Push_0,0.818545808382043
+BOA_0,TGP_0,0.432767580667785
+BOA_0,UMDA_0,0.000107511176729501
+Pure_Push_0,Push_0,0.00161622221505999
+Pure_Push_0,TGP_0,0.000646749122576476
+Pure_Push_0,UMDA_0,0.0832645166635502
+Push_0,TGP_0,0.432767580667785
+Push_0,UMDA_0,0.000107511176729501
+TGP_0,UMDA_0,2.72650465615549e-06
+BOA_1,Pure_Push_1,0.0495346134356267
+BOA_1,Push_1,0.371093369522698
+BOA_1,TGP_1,9.63509000978023e-05
+BOA_1,UMDA_1,0.102470434859749
+Pure_Push_1,Push_1,0.0143058784354296
+Pure_Push_1,TGP_1,0.0718606382258514
+Pure_Push_1,UMDA_1,0.179712494879
+Push_1,TGP_1,1.94604710965541e-05
+Push_1,UMDA_1,0.239316541221495
+TGP_1,UMDA_1,0.130570018115736
+BOA_2,Pure_Push_2,0.0330062576612325
+BOA_2,Push_2,0.852683684334643
+BOA_2,TGP_2,0.193646431269221
+BOA_2,UMDA_2,5.69941162333185e-05
+Pure_Push_2,Push_2,0.00269979606326019
+Pure_Push_2,TGP_2,0.335923813151736
+Pure_Push_2,UMDA_2,0.00752631516645788
+Push_2,TGP_2,0.0284597369163106
+Push_2,UMDA_2,2.00786561242648e-05
+TGP_2,UMDA_2,9.58400566647126e-06

rproject/friedman.r

   return ("")
 }
 
-gi.friedman <- function(db_name){
+gi.wilcoxon.inner <- function(dataset){
+  for(i in 1:5){
+    for(j in i:5){
+      
+      if(i != j){
+        q1 <- do.call(rbind, dataset[i])
+        q2 <- do.call(rbind, dataset[j]) 
+        
+        colnames(q1) <- c("id","key","fitness","hits","generations")
+        colnames(q2) <- c("id","key","fitness","hits","generations")
+        
+        # get distinct name ?
+        q1Name <- q1[1,2]
+        q2Name <- q2[1,2]
+        
+        #print(sprintf("Indexes on list (%d,%d)",i,j))
+        #print(sprintf("Selected Q1: %s, Q2: %s",q1Name,q2Name))
+        
+        df1 <- data.frame(q1$id,q1$key,q1$fitness)  
+        df2 <- data.frame(q2$id,q2$key,q2$fitness)
+        df <- data.frame(q1$fitness,q2$fitness)
+        
+        res <- wilcox.test(q1$fitness,q2$fitness,paired=TRUE)
+        
+        # write the results to the data frame:
+        line <- c(q1Name,q2Name,res$p.value)
+        print(line)
+      }
+    }
+  }
+  return ("")
+}
+
+
+gi.wilcoxon <- function(db_name){
   all <- gi.load.view('v_aggregate_maxes',db_name)
   datasets <- split(all,all$key)