-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcreate_arg_file.jl
124 lines (96 loc) · 2.74 KB
/
create_arg_file.jl
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
## USAGE
## -----
##
## From the command line, execute the following command to create
## arg files for parallelizing experiments:
## julia create_arg_file.jl
# Paths
dir_src = "./src/"
# Load experiment arguments
include(dir_src * "global_variables.jl")
# Synthetic experiment: changing covariance
# -----------------------------------------
output_file = open("gaussian_equivariance_covariance_args.txt", "w")
for n in GV_GAUSS_COV_n
for p in GV_GAUSS_COV_p
for d in GV_GAUSS_COV_d
println(output_file, "$n,$p,$d")
end
end
end
close(output_file)
# Synthetic experiment: isolated non-equivariance
# -----------------------------------------------
output_file = open("gaussian_nonequivariance_covariance_args.txt", "w")
for n in GV_GAUSS_COV_n
for p in GV_GAUSS_COV_p[2:end]
for d in GV_GAUSS_COV_d
println(output_file, "$n,$p,$d")
end
end
end
close(output_file)
# Synthetic experiment: approximate versus exact conditional sampling
# -------------------------------------------------------------------
output_file = open("gaussian_equivariance_truth_args.txt", "w")
for n in GV_GAUSS_TRUTH_n
for p in GV_GAUSS_TRUTH_p
for d in GV_GAUSS_TRUTH_d
for exp in ["none","truth"]
println(output_file, "$n,$p,$d,$exp")
end
end
end
end
close(output_file)
# Synthetic experiment: non-equivariance in mean
# ----------------------------------------------
output_file = open("gaussian_equivariance_sensitivity_args.txt", "w")
for p in GV_GAUSS_SEN_p
for s in GV_GAUSS_SEN_s
for n in GV_GAUSS_SEN_n
println(output_file, "$p,$s,$n")
end
end
end
close(output_file)
# Synthetic experiment: number of randomizations
# ----------------------------------------------
output_file = open("gaussian_equivariance_resamples_args.txt", "w")
for n in GV_GAUSS_RES_n
for p in GV_GAUSS_RES_p
for B in GV_GAUSS_RES_B
println(output_file, "$n,$p,$B")
end
end
end
close(output_file)
# Synthetic experiment: permutation
# ---------------------------------
output_file = open("gaussian_equivariance_permutation_args.txt", "w")
for n in GV_GAUSS_PER_n
for s in GV_GAUSS_PER_s
for d in GV_GAUSS_PER_d
println(output_file, "$n,$s,$d")
end
end
end
close(output_file)
# MNIST experiment
# ----------------
output_file = open("MNIST_args.txt", "w")
for aug in GV_MNIST_aug
for n in GV_MNIST_9
println(output_file, "$(aug),$n")
end
end
close(output_file)
# Invariance experiment
# ---------------------
output_file = open("invariance_args.txt", "w")
for n in GV_INV_n
for p in GV_INV_p
println(output_file, "$n,$p")
end
end
close(output_file)