TARFEFA 1: TESTE DE WILCOXON

wbet = read.csv("vetorAUC_BET.csv", header = FALSE)
wdeg = read.csv("vetorAUC_DEG.csv", header = FALSE)
wneigh = read.csv("vetorAUC_NEIGH.csv", header = FALSE)
wspaths = read.csv("vetorAUC_SPATHS.csv", header = FALSE)
wbet_spaths = read.csv("vetorAUC_BET_SPATHS.csv", header = FALSE)
wcomplete = read.csv("vetorAUC_COMPLETE.csv", header = FALSE)

Combinações

deg

bet

wilcox.test(wbet$V1, wdeg$V1)
## 
##  Wilcoxon rank sum test with continuity correction
## 
## data:  wbet$V1 and wdeg$V1
## W = 3834, p-value = 0.004376
## alternative hypothesis: true location shift is not equal to 0

neigh

wilcox.test(wneigh$V1, wdeg$V1)
## 
##  Wilcoxon rank sum test with continuity correction
## 
## data:  wneigh$V1 and wdeg$V1
## W = 0, p-value < 2.2e-16
## alternative hypothesis: true location shift is not equal to 0

spaths

wilcox.test(wspaths$V1, wdeg$V1)
## 
##  Wilcoxon rank sum test with continuity correction
## 
## data:  wspaths$V1 and wdeg$V1
## W = 33, p-value < 2.2e-16
## alternative hypothesis: true location shift is not equal to 0

bet_spaths

wilcox.test(wbet_spaths$V1, wdeg$V1)
## 
##  Wilcoxon rank sum test with continuity correction
## 
## data:  wbet_spaths$V1 and wdeg$V1
## W = 5378, p-value = 0.3556
## alternative hypothesis: true location shift is not equal to 0

complete

wilcox.test(wcomplete$V1, wdeg$V1)
## 
##  Wilcoxon rank sum test with continuity correction
## 
## data:  wcomplete$V1 and wdeg$V1
## W = 9486, p-value < 2.2e-16
## alternative hypothesis: true location shift is not equal to 0

bet

neigh

wilcox.test(wbet$V1, wneigh$V1)
## 
##  Wilcoxon rank sum test with continuity correction
## 
## data:  wbet$V1 and wneigh$V1
## W = 10000, p-value < 2.2e-16
## alternative hypothesis: true location shift is not equal to 0

spaths

wilcox.test(wbet$V1, wspaths$V1)
## 
##  Wilcoxon rank sum test with continuity correction
## 
## data:  wbet$V1 and wspaths$V1
## W = 9978, p-value < 2.2e-16
## alternative hypothesis: true location shift is not equal to 0

bet_spahts

wilcox.test(wbet$V1, wbet_spaths$V1)
## 
##  Wilcoxon rank sum test with continuity correction
## 
## data:  wbet$V1 and wbet_spaths$V1
## W = 3599, p-value = 0.0006202
## alternative hypothesis: true location shift is not equal to 0

complete

wilcox.test(wbet$V1, wcomplete$V1)
## 
##  Wilcoxon rank sum test with continuity correction
## 
## data:  wbet$V1 and wcomplete$V1
## W = 387, p-value < 2.2e-16
## alternative hypothesis: true location shift is not equal to 0

neigh

spaths

wilcox.test(wneigh$V1, wspaths$V1)
## 
##  Wilcoxon rank sum test with continuity correction
## 
## data:  wneigh$V1 and wspaths$V1
## W = 14, p-value < 2.2e-16
## alternative hypothesis: true location shift is not equal to 0

bet_spahts

wilcox.test(wneigh$V1, wbet_spaths$V1)
## 
##  Wilcoxon rank sum test with continuity correction
## 
## data:  wneigh$V1 and wbet_spaths$V1
## W = 0, p-value < 2.2e-16
## alternative hypothesis: true location shift is not equal to 0

complete

wilcox.test(wneigh$V1, wcomplete$V1)
## 
##  Wilcoxon rank sum test with continuity correction
## 
## data:  wneigh$V1 and wcomplete$V1
## W = 0, p-value < 2.2e-16
## alternative hypothesis: true location shift is not equal to 0

spaths

bet_spahts

wilcox.test(wspaths$V1, wbet_spaths$V1)
## 
##  Wilcoxon rank sum test with continuity correction
## 
## data:  wspaths$V1 and wbet_spaths$V1
## W = 12.5, p-value < 2.2e-16
## alternative hypothesis: true location shift is not equal to 0

complete

wilcox.test(wspaths$V1, wcomplete$V1)
## 
##  Wilcoxon rank sum test with continuity correction
## 
## data:  wspaths$V1 and wcomplete$V1
## W = 0, p-value < 2.2e-16
## alternative hypothesis: true location shift is not equal to 0

bet_spaths

complete

wilcox.test(wbet_spaths$V1, wcomplete$V1)
## 
##  Wilcoxon rank sum test with continuity correction
## 
## data:  wbet_spaths$V1 and wcomplete$V1
## W = 794, p-value < 2.2e-16
## alternative hypothesis: true location shift is not equal to 0

A tabela resultante ficou assim





TAREFA 2: Gráfico com tudo

E agora?

thcomplete = read.csv("vote_threshold_summary.csv")
fpCutcomplete <- cut(thcomplete$FP, breaks = 20)
boxplot(boxwex = 0.3, thcomplete$TP ~ fpCutcomplete, col = 2, xlab = "False Positive rate", 
    ylab = "True Positive rate", xaxt = "n", outline = FALSE)
axis(1, at = c(0, 4, 8, 12, 16, 20), c(0, 0.2, 0.4, 0.6, 0.8, 1))
abline(0, 0.05, lwd = 3, col = "red")

thdeg = read.csv("vote_threshold_summary_DEG.csv")
fpCutdeg <- cut(thdeg$FP, breaks = 20)
boxplot(boxwex = 0.3, thdeg$TP ~ fpCutdeg, add = TRUE, col = 4, xaxt = "n", 
    outline = FALSE)


thneigh = read.csv("vote_threshold_summary_NEIGH.csv")
fpCutneigh <- cut(thneigh$FP, breaks = 20)
boxplot(boxwex = 0.3, thneigh$TP ~ fpCutneigh, add = TRUE, col = 6, xaxt = "n", 
    outline = FALSE)

thbetspaths = read.csv("vote_threshold_summary_BET_SPATHS.csv")
fpCutbetspaths <- cut(thbetspaths$FP, breaks = 20)
boxplot(boxwex = 0.3, thbetspaths$TP ~ fpCutbetspaths, add = TRUE, col = 7, 
    xaxt = "n", outline = FALSE)


legend(bty = "n", 16, 0.4, c("complete", "deg", "neigh", "bet_spaths"), fill = c("red", 
    "blue", "magenta", "yellow"))

plot of chunk unnamed-chunk-17

Será que é isso que vc queria Marcio?

thcomplete = read.csv("vote_threshold_summary.csv")
fpCutcomplete <- cut(thcomplete$FP, breaks = 20)
boxplot(thcomplete$TP ~ fpCutcomplete, col = 2, xlab = "False Positive rate", 
    ylab = "True Positive rate", xaxt = "n")
axis(1, at = c(0, 4, 8, 12, 16, 20), c(0, 0.2, 0.4, 0.6, 0.8, 1))
abline(0, 0.05, col = "red")

thbet = read.csv("vote_threshold_summary_BET.csv")
fpCutbet <- cut(thbet$FP, breaks = 20)
boxplot(thbet$TP ~ fpCutbet, add = TRUE, col = 3, xaxt = "n")

thdeg = read.csv("vote_threshold_summary_DEG.csv")
fpCutdeg <- cut(thdeg$FP, breaks = 20)
boxplot(thdeg$TP ~ fpCutdeg, add = TRUE, col = 4, xaxt = "n")

thspaths = read.csv("vote_threshold_summary_SPATHS.csv")
fpCutspaths <- cut(thspaths$FP, breaks = 20)
boxplot(thspaths$TP ~ fpCutspaths, add = TRUE, col = 5, xaxt = "n")

thneigh = read.csv("vote_threshold_summary_NEIGH.csv")
fpCutneigh <- cut(thneigh$FP, breaks = 20)
boxplot(thneigh$TP ~ fpCutneigh, add = TRUE, col = 6, xaxt = "n")

thbetspaths = read.csv("vote_threshold_summary_BET_SPATHS.csv")
fpCutbetspaths <- cut(thbetspaths$FP, breaks = 20)
boxplot(thbetspaths$TP ~ fpCutbetspaths, add = TRUE, col = 7, xaxt = "n")
legend(16, 0.4, c("complete", "bet", "deg", "spaths", "neigh", "bet_spaths"), 
    fill = c("red", "green", "blue", "cyan", "magenta", "yellow"))

plot of chunk unnamed-chunk-18