-
Notifications
You must be signed in to change notification settings - Fork 0
/
evaluation.R
286 lines (224 loc) · 9.44 KB
/
evaluation.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
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
my.path <- "d:\\Projects\\Python\\PycharmProjects\\DeepVisualAttentionPrediction\\nowe_eksperymenty\\"
my.dir <- "checkpoint_1pyramids\\"
my.file <- "ALG_1_v1_Page_1.jpg\\results.txt.log"
pp <- paste(my.path, my.dir, my.file, sep = "")
df <- read.csv(pp)
plot(df$epoch, df$loss, type = "l", xlab = "epoch", ylab = "train loss (MSE)")
my.dir <- "checkpoint_2pyramids\\"
pp <- paste(my.path, my.dir, my.file, sep = "")
df <- read.csv(pp)
lines(df$epoch, df$loss, type = "l", col = "red")
my.dir <- "checkpoint_3pyramids\\"
pp <- paste(my.path, my.dir, my.file, sep = "")
df <- read.csv(pp)
lines(df$epoch, df$loss, type = "l", col = "blue")
my.dir <- "checkpoint_4pyramids\\"
pp <- paste(my.path, my.dir, my.file, sep = "")
df <- read.csv(pp)
lines(df$epoch, df$loss, type = "l", col = "cyan")
my.dir <- "checkpoint_places_3pyramids\\"
pp <- paste(my.path, my.dir, my.file, sep = "")
df <- read.csv(pp)
lines(df$epoch, df$loss, type = "l", col = "green")
legend(20, 0.44, legend=c("E-D Pyramid 1", "E-D Pyramid 2","E-D Pyramid 3", "E-D Pyramid 4","2 x E-D Pyramid 1"),
col=c("black","red", "blue", "cyan","green"), lty = 1, cex=0.8)
my.dir <- "checkpoint_1pyramids\\"
my.file <- "ALG_1_v1_Page_1.jpg\\results.txt.log"
pp <- paste(my.path, my.dir, my.file, sep = "")
df <- read.csv(pp)
plot(df$epoch, df$val_loss, type = "l", xlab = "epoch", ylab = "validation loss (MSE)", ylim = c(0.24, 0.45))
my.dir <- "checkpoint_2pyramids\\"
pp <- paste(my.path, my.dir, my.file, sep = "")
df <- read.csv(pp)
lines(df$epoch, df$val_loss, type = "l", col = "red")
my.dir <- "checkpoint_3pyramids\\"
pp <- paste(my.path, my.dir, my.file, sep = "")
df <- read.csv(pp)
lines(df$epoch, df$val_loss, type = "l", col = "blue")
my.dir <- "checkpoint_4pyramids\\"
pp <- paste(my.path, my.dir, my.file, sep = "")
df <- read.csv(pp)
lines(df$epoch, df$val_loss, type = "l", col = "cyan")
my.dir <- "checkpoint_places_3pyramids\\"
pp <- paste(my.path, my.dir, my.file, sep = "")
df <- read.csv(pp)
lines(df$epoch, df$val_loss, type = "l", col = "green")
legend(20, 0.38, legend=c("E-D Pyramid 1", "E-D Pyramid 2","E-D Pyramid 3","E-D Pyramid 4", "2 x E-D Pyramid 1"),
col=c("black","red", "blue", "cyan","green"), lty = 1, cex=0.8)
##############################################
my.path <- "d:\\Projects\\Python\\PycharmProjects\\DeepVisualAttentionPrediction\\nowe_eksperymenty\\"
var <- c('ALG_1_v1_Page_1.jpg', 'ALG_1_v2_Page_1.jpg', 'ALG_2_v1_Page_1.jpg', 'ALG_2_v2_Page_1.jpg', 'BIO_Page_1.jpg',
'FIZ_WB1_Page_1.jpg', 'FIZ_WB2.jpg', 'FIZ_WB3_v1_Page_1.jpg', 'FIZ_WB3_v2_Page_1.jpg', 'FIZ_WB4_stereo_Page_1.jpg',
'FIZ_WZORY_Page_1.jpg', 'rz 1_Page_1.jpg', 'rz 2_Page_1.jpg', 'rz 3_Page_1.jpg')
my.dir <- "checkpoint_1pyramids\\"
my.file <- "\\results.txt.log"
loss.list <- list()
val_loss.list <- list()
for (a in 1:length(var))
{
var.var <- paste(my.path, my.dir, var[a], my.file, sep = "")
df <- read.csv(var.var)
loss.list[[a]] <- df[10,]$loss
val_loss.list[[a]] <- df[10,]$val_loss
}
ed1 = unlist(loss.list)
ed1_1 = unlist(val_loss.list)
#round(mean(unlist(loss.list)),3)
#round(sd(unlist(loss.list)),3)
#round(mean(unlist(val_loss.list)),3)
#round(sd(unlist(val_loss.list)),3)
##############################################
my.path <- "d:\\Projects\\Python\\PycharmProjects\\DeepVisualAttentionPrediction\\nowe_eksperymenty\\"
var <- c('ALG_1_v1_Page_1.jpg', 'ALG_1_v2_Page_1.jpg', 'ALG_2_v1_Page_1.jpg', 'ALG_2_v2_Page_1.jpg', 'BIO_Page_1.jpg',
'FIZ_WB1_Page_1.jpg', 'FIZ_WB2.jpg', 'FIZ_WB3_v1_Page_1.jpg', 'FIZ_WB3_v2_Page_1.jpg', 'FIZ_WB4_stereo_Page_1.jpg',
'FIZ_WZORY_Page_1.jpg', 'rz 1_Page_1.jpg', 'rz 2_Page_1.jpg', 'rz 3_Page_1.jpg')
my.dir <- "checkpoint_2pyramids\\"
my.file <- "\\results.txt.log"
loss.list <- list()
val_loss.list <- list()
for (a in 1:length(var))
{
var.var <- paste(my.path, my.dir, var[a], my.file, sep = "")
df <- read.csv(var.var)
loss.list[[a]] <- df[10,]$loss
val_loss.list[[a]] <- df[10,]$val_loss
}
ed2 = unlist(loss.list)
ed2_1 = unlist(val_loss.list)
#round(mean(unlist(loss.list)),3)
#round(sd(unlist(loss.list)),3)
#round(mean(unlist(val_loss.list)),3)
#round(sd(unlist(val_loss.list)),3)
##############################################
my.path <- "d:\\Projects\\Python\\PycharmProjects\\DeepVisualAttentionPrediction\\nowe_eksperymenty\\"
var <- c('ALG_1_v1_Page_1.jpg', 'ALG_1_v2_Page_1.jpg', 'ALG_2_v1_Page_1.jpg', 'ALG_2_v2_Page_1.jpg', 'BIO_Page_1.jpg',
'FIZ_WB1_Page_1.jpg', 'FIZ_WB2.jpg', 'FIZ_WB3_v1_Page_1.jpg', 'FIZ_WB3_v2_Page_1.jpg', 'FIZ_WB4_stereo_Page_1.jpg',
'FIZ_WZORY_Page_1.jpg', 'rz 1_Page_1.jpg', 'rz 2_Page_1.jpg', 'rz 3_Page_1.jpg')
my.dir <- "checkpoint_3pyramids\\"
my.file <- "\\results.txt.log"
loss.list <- list()
val_loss.list <- list()
for (a in 1:length(var))
{
var.var <- paste(my.path, my.dir, var[a], my.file, sep = "")
print(var.var)
df <- read.csv(var.var)
loss.list[[a]] <- df[10,]$loss
val_loss.list[[a]] <- df[10,]$val_loss
}
ed3 = unlist(loss.list)
ed3_1 = unlist(val_loss.list)
#round(mean(unlist(loss.list)),3)
#round(sd(unlist(loss.list)),3)
#round(mean(unlist(val_loss.list)),3)
#round(sd(unlist(val_loss.list)),3)
##############################################
my.path <- "d:\\Projects\\Python\\PycharmProjects\\DeepVisualAttentionPrediction\\nowe_eksperymenty\\"
var <- c('ALG_1_v1_Page_1.jpg', 'ALG_1_v2_Page_1.jpg', 'ALG_2_v1_Page_1.jpg', 'ALG_2_v2_Page_1.jpg', 'BIO_Page_1.jpg',
'FIZ_WB1_Page_1.jpg', 'FIZ_WB2.jpg', 'FIZ_WB3_v1_Page_1.jpg', 'FIZ_WB3_v2_Page_1.jpg', 'FIZ_WB4_stereo_Page_1.jpg',
'FIZ_WZORY_Page_1.jpg', 'rz 1_Page_1.jpg', 'rz 2_Page_1.jpg', 'rz 3_Page_1.jpg')
my.dir <- "checkpoint_4pyramids\\"
my.file <- "\\results.txt.log"
loss.list <- list()
val_loss.list <- list()
for (a in 1:length(var))
{
var.var <- paste(my.path, my.dir, var[a], my.file, sep = "")
print(var.var)
df <- read.csv(var.var)
loss.list[[a]] <- df[10,]$loss
val_loss.list[[a]] <- df[10,]$val_loss
}
ed4 = unlist(loss.list)
ed4_1 = unlist(val_loss.list)
#round(mean(unlist(loss.list)),3)
#round(sd(unlist(loss.list)),3)
#round(mean(unlist(val_loss.list)),3)
#round(sd(unlist(val_loss.list)),3)
##############################################
my.path <- "d:\\Projects\\Python\\PycharmProjects\\DeepVisualAttentionPrediction\\nowe_eksperymenty\\"
var <- c('ALG_1_v1_Page_1.jpg', 'ALG_1_v2_Page_1.jpg', 'ALG_2_v1_Page_1.jpg', 'ALG_2_v2_Page_1.jpg', 'BIO_Page_1.jpg',
'FIZ_WB1_Page_1.jpg', 'FIZ_WB2.jpg', 'FIZ_WB3_v1_Page_1.jpg', 'FIZ_WB3_v2_Page_1.jpg', 'FIZ_WB4_stereo_Page_1.jpg',
'FIZ_WZORY_Page_1.jpg', 'rz 1_Page_1.jpg', 'rz 2_Page_1.jpg', 'rz 3_Page_1.jpg')
my.dir <- "checkpoint_places_3pyramids\\"
my.file <- "\\results.txt.log"
loss.list <- list()
val_loss.list <- list()
for (a in 1:length(var))
{
var.var <- paste(my.path, my.dir, var[a], my.file, sep = "")
df <- read.csv(var.var)
loss.list[[a]] <- df[10,]$loss
val_loss.list[[a]] <- df[10,]$val_loss
}
edp = unlist(loss.list)
edp_1 = unlist(val_loss.list)
#round(mean(unlist(loss.list)),3)
#round(sd(unlist(loss.list)),3)
#round(mean(unlist(val_loss.list)),3)
#round(sd(unlist(val_loss.list)),3)
##############################################
sti = c("S1", "S2", "S3", "S4", "S5", "S6", "S7", "S8", "S9", "S10", "S11", "S12", "S13", "S14")
df = data.frame(sti, ed1, ed2, ed3, ed4, edp)
sink("D:\\Publikacje\\eye tracking\\Symmetry\\table2wyniki1.txt")
for (a in 1:nrow(df))
{
pp = paste(df[a,1], "&",
round(df[a,2],3), "&",
round(df[a,3],3), "&",
round(df[a,4],3), "&",
round(df[a,5],3), "&",
round(df[a,6],3), "&", "\\\\", sep = "")
cat(pp)
cat('\n')
}
pp = paste("Average", "&",
round(mean(ed1),3), "$\\pm$", round(sd(ed1),3), "&",
round(mean(ed2),3), "$\\pm$", round(sd(ed2),3), "&",
round(mean(ed3),3), "$\\pm$", round(sd(ed3),3), "&",
round(mean(ed4),3), "$\\pm$", round(sd(ed4),3), "&",
round(mean(edp),3), "$\\pm$", round(sd(edp),3), "\\\\"
)
cat(pp)
cat('\n')
sink()
######################################
sti = c("S1", "S2", "S3", "S4", "S5", "S6", "S7", "S8", "S9", "S10", "S11", "S12", "S13", "S14")
df = data.frame(sti, ed1_1, ed2_1, ed3_1, ed4_1, edp_1)
sink("D:\\Publikacje\\eye tracking\\Symmetry\\table222wyniki1.txt")
for (a in 1:nrow(df))
{
pp = paste(df[a,1], "&",
round(df[a,2],3), "&",
round(df[a,3],3), "&",
round(df[a,4],3), "&",
round(df[a,5],3), "&",
round(df[a,6],3), "&", "\\\\", sep = "")
cat(pp)
cat('\n')
}
pp = paste("Average", "&",
round(mean(ed1_1),3), "$\\pm$", round(sd(ed1_1),3), "&",
round(mean(ed2_1),3), "$\\pm$", round(sd(ed2_1),3), "&",
round(mean(ed3_1),3), "$\\pm$", round(sd(ed3_1),3), "&",
round(mean(ed4_1),3), "$\\pm$", round(sd(ed4_1),3), "&",
round(mean(edp_1),3), "$\\pm$", round(sd(edp_1),3), "\\\\"
)
cat(pp)
cat('\n')
sink()
######################################
sink("D:\\Publikacje\\eye tracking\\Symmetry\\tablewyniki2v2.txt")
wy = read.table("D:\\Publikacje\\eye tracking\\Symmetry\\wyniki2v2.txt", sep = "\t")
for (a in 1:nrow(wy))
{
wr = paste(wy[a,1], "&",
round(wy[a,2],3),"$\\pm$", round(wy[a,3],3), "&",
round(wy[a,4],3),"$\\pm$", round(wy[a,5],3), "&",
round(wy[a,6],3),"$\\pm$", round(wy[a,7],3), "&",
round(wy[a,8],3),"$\\pm$", round(wy[a,9],3), "&",
round(wy[a,10],3),"$\\pm$", round(wy[a,11],3), "&", round(wy[a,12],0), "\\\\", sep = "")
cat(wr)
cat('\n')
}
sink()