-
Notifications
You must be signed in to change notification settings - Fork 0
/
plot_results.R
24 lines (17 loc) · 905 Bytes
/
plot_results.R
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
library(ggplot2)
library(data.table)
times = fread("results/all.txt", header = T)
times = times[sec > 1]
times[, model := factor(model, levels = c(0,1,2),
labels = c("basic","MPI","thereading"))
][,shards := factor(shards)
]
m = times[, list(sec = mean(sec)) , by = c("model","N","shards")]
ggplot(m, aes(x = N, y = sec, group = model:shards, color = model, lty = shards)) + geom_line() + geom_point()
m[, relative := sec/max(sec), by = "N"]
ggplot(m, aes(x = N, y = relative, group = model:shards, color = model, lty = shards)) + geom_line() + geom_point()
m[, relative := sec/max(sec), by = "N"]
m[, relative2 := (1/as.numeric(as.character(shards)))/(sec/max(sec)), by = "N"]
m[, analysis := paste0(shards,"-",model) ]
round(xtabs(relative~ analysis + N, m[model != "basic"]),digits = 2)
round(xtabs(relative2~ analysis + N, m[model != "basic"]),digits = 2)