-
Notifications
You must be signed in to change notification settings - Fork 0
/
conditioning.jl
70 lines (62 loc) · 2.82 KB
/
conditioning.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
using ODWB
using Printf
using LinearAlgebra
using DataFrames
using CSV
# for the prelimenary runs
#dimensions = [20,30,50,60,80,100,120,150,180,200]
#fracs = [4,6,8,10]
# for exclusive
dimensions = [50,60,80,100,120]
fracs = [4,10]
for m in dimensions #[20,30,50,60,80,100,
for k in fracs
n = Int(floor(m/k))
for seed in 1:5
A, _, N, _ = ODWB.build_data(seed, m, n, false, false)
eigs = eigvals(A'*A)
maxeig= maximum(eigs)
mineig = minimum(eigs)
df = DataFrame(seed=seed, numberOfExperiments=m, numberOfParameters=n, frac=k, numberOfAllowedEx=N, eigmax = maxeig, eigmin=mineig, ratio = maxeig/mineig)
file_name = joinpath(@__DIR__, "csv/opt_independent_data.csv")
if !isfile(file_name)
CSV.write(file_name, df, append=true, writeheader=true, delim=";")
else
CSV.write(file_name, df, append=true, delim=";")
end
A, _, N, _ = ODWB.build_data(seed, m, n, false, true)
eigs = eigvals(A'*A)
maxeig= maximum(eigs)
mineig = minimum(eigs)
df = DataFrame(seed=seed, numberOfExperiments=m, numberOfParameters=n, frac=k, numberOfAllowedEx=N, eigmax = maxeig, eigmin=mineig, ratio = maxeig/mineig)
file_name = joinpath(@__DIR__, "csv/opt_correlated_data.csv")
if !isfile(file_name)
CSV.write(file_name, df, append=true, writeheader=true, delim=";")
else
CSV.write(file_name, df, append=true, delim=";")
end
A, _, N, _ = ODWB.build_data(seed, m, n, true, false)
eigs = eigvals(A'*A)
maxeig= maximum(eigs)
mineig = minimum(eigs)
df = DataFrame(seed=seed, numberOfExperiments=m, numberOfParameters=n, frac=k, numberOfAllowedEx=N, eigmax = maxeig, eigmin=mineig, ratio = maxeig/mineig)
file_name = joinpath(@__DIR__, "csv/fusion_independent_data.csv")
if !isfile(file_name)
CSV.write(file_name, df, append=true, writeheader=true, delim=";")
else
CSV.write(file_name, df, append=true, delim=";")
end
A, _, N, _ = ODWB.build_data(seed, m, n, true, true)
eigs = eigvals(A'*A)
maxeig= maximum(eigs)
mineig = minimum(eigs)
df = DataFrame(seed=seed, numberOfExperiments=m, numberOfParameters=n, frac=k, numberOfAllowedEx=N, eigmax = maxeig, eigmin=mineig, ratio = maxeig/mineig)
file_name = joinpath(@__DIR__, "csv/fusion_correlated_data.csv")
if !isfile(file_name)
CSV.write(file_name, df, append=true, writeheader=true, delim=";")
else
CSV.write(file_name, df, append=true, delim=";")
end
end
end
end